about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-12-01 14:30:07 +0100
committerGitHub <noreply@github.com>2024-12-01 14:30:07 +0100
commitae6a7dba2a58247ac7c41730ff95f05045b87cfd (patch)
tree5c66939ed50d714e4db139c51b5f85267edeae74 /compiler/rustc_mir_transform/src/errors.rs
parent6c76ed5503966c39381fac64eb905ac45e346695 (diff)
parent6bbf832cf266e48c1e8773e5d64a7e90bd866c7b (diff)
downloadrust-ae6a7dba2a58247ac7c41730ff95f05045b87cfd.tar.gz
rust-ae6a7dba2a58247ac7c41730ff95f05045b87cfd.zip
Rollup merge of #132974 - madsmtm:linker-arguments-with-commas, r=petrochenkov
Properly pass linker arguments that contain commas

When linking with the system C compiler, we sometimes want to forward certain arguments unchanged to the linker. This can be done with `-Wl,arg1,arg2` or `-Xlinker arg1 -Xlinker arg2`. `-Wl` is used when possible, since it is more compact, but it does not support commas in the argument itself - in those cases, we need to use `-Xlinker`, and that is what this PR implements.

This also fixes using sanitizers on macOS with `-Clinker-flavor=ld`, as those were previously manually using `-Wl`/`-Xlinker` (probably since the support wasn't present in the `link_args` function).

Note that there has been [a previous PR for this](https://github.com/rust-lang/rust/pull/38798), but it only implemented this in certain cases when passing `-rpath`.

r? compiler
Diffstat (limited to 'compiler/rustc_mir_transform/src/errors.rs')
0 files changed, 0 insertions, 0 deletions