about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-10-01 03:24:02 +0000
committerbors <bors@rust-lang.org>2018-10-01 03:24:02 +0000
commitf55129d0037c112a80276ee1de0c2245ddc6462c (patch)
tree0f6e69b8b1138ac7735b80f035a185175f5b4b1e /src/rustllvm/RustWrapper.cpp
parent03379648df3e1671506918f2eb31deff7e463cc8 (diff)
parent6f4b378e840209561f0ea1c013f9725b584a53e8 (diff)
downloadrust-f55129d0037c112a80276ee1de0c2245ddc6462c.tar.gz
rust-f55129d0037c112a80276ee1de0c2245ddc6462c.zip
Auto merge of #54675 - alexcrichton:defaultlibs, r=varkor
rust: Add a `-C default-linker-libraries` option

This commit adds a new codegen option for the compiler which disables
rustc's passing of `-nodefaultlibs` by default on relevant platforms.
Sometimes Rust is linked with C code which fails to link with
`-nodefaultlibs` and is unnecessarily onerous to get linking correctly
with `-nodefaultlibs`.

An example of this is that when you compile C code with sanitizers and
then pass `-fsanitize=address` to the linker, it's incompatible with
`-nodefaultlibs` also being passed to the linker.

In these situations it's easiest to turn off Rust's default passing of
`-nodefaultlibs`, which was more ideological to start with than
anything! Preserving the default is somewhat important but having this
be opt-in shouldn't cause any breakage.

Closes #54237
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions