Cannot opt out of LLVM MergeFunctions pass on stable #64310
Closed
Description
LLVM's MergeFunctions introduces aliases which can trigger a bug in macOS's ld64
linker when compiling with ThinLTO: https://github.com/froydnj/ld64-aliases-bug
For this reason Firefox has to be built with a patched version of ld64
when compiling with xLTO. Since the bug in question is pretty nasty (the above example shows a program just returning a different value with no indication that anything is wrong), we should probably try to not trigger it.
Right now, however, it seems that one cannot even turn the MergeFunctions pass off in stable Rust. (I wonder if the pass should even be disabled by default on macOS?)
cc @rust-lang/compiler, @rust-lang/wg-codegen & @peterhj (this seems related to #57356)
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generationArea: linking into static, shared libraries and binariesIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessOperating system: macOSRelevant to the compiler team, which will review and decide on the PR/issue.
Activity