Skip to content

Cannot opt out of LLVM MergeFunctions pass on stable #64310

Closed
@michaelwoerister

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationA-linkageArea: linking into static, shared libraries and binariesI-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessO-macosOperating system: macOST-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions