Uh oh!
There was an error while loading. Please reload this page.
Correct default value for default-linker-libraries - #110337
Conversation
This setting is false by default according to rustc code here: https://github.com/rust-lang/rust/blob/master/compiler/rustc_session/src/options.rs#L1236 I tested on a project and confirmed that setting this to false has no effect, the linker flag still appears. Setting it to true removes the linker flag.
rustbot
commented
Apr 14, 2023
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
jyn514
commented
Apr 15, 2023
I think the default for this flag may be platform specific. See #109717. |
The PR linked to from that issue was from 2014, and the code in question seems like it has changed a bit since then. I can't find any platform-specific code for this right now, but I'd appreciate anything so I can make the docs more precise. |
jyn514
commented
Apr 17, 2023
@bors r+ rollup I think there might be subtleties here, but I don't have time to dig into the code, and this seems like an improvement over the existing docs which are definitely wrong. Thanks for the PR! |
bors
commented
Apr 17, 2023
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#104055 (Migrate diagnostics in `rustc_borrowck`) - rust-lang#110257 (fix false positives for `unused_parens` around unary and binary operations) - rust-lang#110313 (allow `repr(align = x)` on inherent methods) - rust-lang#110337 (Correct default value for default-linker-libraries) - rust-lang#110386 (Clean up traversal macros) - rust-lang#110394 (Various minor Idx-related tweaks) - rust-lang#110425 (Encode def span for `ConstParam`) - rust-lang#110434 (Check freeze with right param-env in `deduced_param_attrs`) - rust-lang#110455 (tests: adapt for LLVM change 5b386b8) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This setting is false by default according to rustc code here: https://github.com/rust-lang/rust/blob/master/compiler/rustc_session/src/options.rs#L1236
I tested on a project and confirmed the behavior described. First, with no value, the
-nodefaultlibslinker flag is present. Setting this to false has no effect, as well. The linker flag still appears. Setting it to true removes the linker flag as expected.