-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
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 (
|
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. |
@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! |
…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
-nodefaultlibs
linker 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.