Uh oh!
There was an error while loading. Please reload this page.
[WIP] rustc_target: Remove crt_static_respected and crt_static_allows_dylibs - #70501
[WIP] rustc_target: Remove crt_static_respected and crt_static_allows_dylibs#70501petrochenkov wants to merge 1 commit into
crt_static_respected and crt_static_allows_dylibs#70501Conversation
…libs` Always respect `+crt-static` option if user passed it.
rust-highfive
commented
Mar 28, 2020
r? @cramertj (rust_highfive has picked a reviewer for you, use r? to override) |
petrochenkov
commented
Mar 28, 2020
For some background: I needed to produce some library usable in a restricted environment requiring no dynamically linked libc (a binary instrumentation system), this is an issue I immediately encountered when attempting to do it in Rust instead of C/C++. |
rust-highfive
commented
Mar 28, 2020
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
petrochenkov
commented
Mar 29, 2020
Hmm, this setup may break though if |
petrochenkov
commented
Apr 2, 2020
I don't have resources to pursue this, unfortunately, and I needed this yesterday rather than in few months in the future. The workaround is to produce a |
Always respect
+crt-staticoption if user passed it.If the user wants to link to e.g. bionic or glibc statically,
rustcshould at least not stay in the way.Linking to libc statically may require linking some startup files as well or passing extra linker options.
For some targets like
*-muslrustcsupports doing it implicitly.For other targets it's responsibility of the user passing
+crt-staticto link them using-C (pre-)link-argsand similar flags.cc rust-lang/libc#1711#40113#70095