Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set dso_local for hidden, private and local items #83592

Merged
merged 1 commit into from
Apr 6, 2021

Commits on Apr 2, 2021

  1. Manually set dso_local when its valid to do so

    This should have no real effect in most cases, as e.g. `hidden`
    visibility already implies `dso_local` (or at least LLVM IR does not
    preserve the `dso_local` setting if the item is already `hidden`), but
    it should fix `-Crelocation-model=static` and improve codegen in
    executables.
    
    Note that this PR does not exhaustively port the logic in [clang]. Only
    the obviously correct portion and what is necessary to fix a regression
    from LLVM 12 that relates to `-Crelocation_model=static`.
    
    Fixes rust-lang#83335
    
    [clang]: https://github.com/llvm/llvm-project/blob/3001d080c813da20b329303bf8f45451480e5905/clang/lib/CodeGen/CodeGenModule.cpp#L945-L1039
    nagisa committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    2f000a7 View commit details
    Browse the repository at this point in the history