Update LLVM for Mach-O __LINKEDIT alignment fix. - #158410
Conversation
|
Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @cuviper (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
Why was this reviewer chosen?The reviewer was selected based on:
|
|
|
Note, this also includes the 22.1.8 update from rust-lang/llvm-project#197 @bors r+ rollup=iffy (LLVM rebuild) |
…lign-157750, r=cuviper Update LLVM for Mach-O __LINKEDIT alignment fix. Update LLVM submodule to pull in changes from rust-lang/llvm-project#198. Fixes rust-lang#157750. This backport has been discussed in: [#t-compiler > Backport LLVM change to Rust for macOS 27 support?](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Backport.20LLVM.20change.20to.20Rust.20for.20macOS.2027.20support.3F/with/605925959).
Rollup of 10 pull requests Successful merges: - #158410 (Update LLVM for Mach-O __LINKEDIT alignment fix.) - #157397 (cmse: clear padding when crossing the secure boundary) - #158036 (Add -Zinstrument-mcount=fentry to -Zinstrument-mcount) - #158330 (llvm: use intrinsics for f16, f32 minimum/maximum) - #158359 (fix(tests): allow either branch direction in ilog_known_base) - #158067 (LLVM 23: Adapt codegen test to moved assume) - #158261 (Move part of the target checking for `#[may_dangle]` to the parser) - #158358 (Fix invalid E0609 raw pointer deref suggestion inside macros) - #158392 (delegation: add tests for defaults and infers in generics) - #158394 (Generate synthetic generic args only for delegation's child segment)
Rollup merge of #158410 - goranmoomin:update-llvm-linkedit-align-157750, r=cuviper Update LLVM for Mach-O __LINKEDIT alignment fix. Update LLVM submodule to pull in changes from rust-lang/llvm-project#198. Fixes #157750. This backport has been discussed in: [#t-compiler > Backport LLVM change to Rust for macOS 27 support?](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Backport.20LLVM.20change.20to.20Rust.20for.20macOS.2027.20support.3F/with/605925959).
Upstream fixed this in rust-lang/rust#158410, and the LLVM 22.1.8 bundled in 1.98.0 now aligns every LINKEDIT entry to pointer size rather than just the symbol strings, so the patch is redundant. Its LLVM hunk no longer applies to that refactored MachOLayoutBuilder either, so the patch phase would fail outright on any system matching the guard. No revision bump: the guard was `os.major >= 27`, which no buildable system satisfies, so the patch never applied and the installed files do not change. Assisted-by: Claude:claude-opus-5
规避背景(c8f05c8):Xcode 27 链接器为大符号量 cdylib 排布 Mach-O 符号表 时串池不按 8 字节对齐,macOS 27 dyld 对声明 sdk ≥ 27 的二进制 dlopen 拒载,当时以 -Wl,-platform_version 声明 SDK 26.0 走宽容路径规避。 rust-lang/rust#158410(llvm-objcopy Mach-O 串池对齐)已随 rustc 1.98.0 落地,mise 钉版 1.97.1 → 1.98.0;本机 macOS 27 + CLT ld-27037 实测: 去规避后无论 strip 与否,产物声明 sdk 27.0、stroff 8 字节对齐、node dlopen 均通过。CI macos-latest 为 macOS 26 + Xcode 26.6,本就无此 问题。[profile.release] strip 维持停用,注释更正为已验证可随时恢复。
Update LLVM submodule to pull in changes from rust-lang/llvm-project#198.
Fixes #157750.
This backport has been discussed in: #t-compiler > Backport LLVM change to Rust for macOS 27 support?.