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

Fix ld64 flags #90717

Merged
merged 3 commits into from
Nov 15, 2021
Merged

Fix ld64 flags #90717

merged 3 commits into from
Nov 15, 2021

Commits on Nov 14, 2021

  1. Add a helper method for linker arguments

    Linker arguments must transformed when Rust is interacting with the
    linker through a compiler. This commit introduces a helper function
    that abstracts away details of this transformation.
    kit-981 committed Nov 14, 2021
    Configuration menu
    Copy the full SHA
    9bbc9cb View commit details
    Browse the repository at this point in the history
  2. Refactor linker argument generation

    This commit refactors linker argument generation to leverage a helper
    function that abstracts away details governing how these arguments are
    transformed and provided to the linker.
    
    This fixes the misuse of the `-exported_symbols_list` when an ld-like
    linker is used rather than a compiler. A compiler would expect
    `-Wl,-exported_symbols_list,path` but ld would expect
    `-exported_symbols_list` and `path` as two seperate arguments. Prior
    to this change, an ld-like linker was given
    `-exported_symbols_list,path`.
    kit-981 committed Nov 14, 2021
    Configuration menu
    Copy the full SHA
    32ddd02 View commit details
    Browse the repository at this point in the history
  3. Only use the -dynamiclib flag when the linker is not ld

    This is not a valid flag for ld64. When the ld64 linker is explicitly
    provided through `config.toml`, rustc will not successfully compile.
    kit-981 committed Nov 14, 2021
    Configuration menu
    Copy the full SHA
    f44fa63 View commit details
    Browse the repository at this point in the history