mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-05 03:36:21 +00:00

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`.
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.