-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix rust.use-lld when linker is not set #76326
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
I wonder if we should be warning folks if they do set use-lld and then we are just basically ignoring that. |
@Mark-Simulacrum Since #75111 |
Ah right, okay, makes sense. I'm going to @bors r+ this then, but we can back out if people disagree. It sounds like the right thing. |
📌 Commit a2fbf39 has been approved by |
I can confirm that hangs in #76127 (comment) occur in winpthreads, and that rust-lld shipped with rustc was used, and this PR fixes that. The fix however causes an error during linking
which is very strange because
|
@petrochenkov at which stage? |
Ha, maybe! |
I cannot test it right now but sounds like this could be fixed when #76167 lands in bootstrap compiler. |
This is indeed the reason, the ancient |
We need an external toolchain for UPD: We have our own |
(Anyway, the local workaround of nuking
works.) |
Full |
|
…imulacrum Fix rust.use-lld when linker is not set Fixes rust-lang#76127 (comment) Previously when `[<target>].linker` was not configured `rust.use-lld` would set it to `rust-lld` on platforms where it should not.
The |
…imulacrum Fix rust.use-lld when linker is not set Fixes rust-lang#76127 (comment) Previously when `[<target>].linker` was not configured `rust.use-lld` would set it to `rust-lld` on platforms where it should not.
☀️ Test successful - checks-actions, checks-azure |
…lacrum rustbuild: Do not use `rust-mingw` component when bootstrapping windows-gnu targets Addresses rust-lang#76326 (comment) (ancient `x86_64-w64-mingw32-gcc` is selected as a linker wrapper, which is not usable in `use_lld=true` mode). Perhaps the comment about incompatible mingw was true in the past, but many things changed since then. With this change I was able to build everything successfully locally using a newer mingw toolchain, if it passes through the older toolchain on CI, then it should be good, I think.
Fixes #76127 (comment)
Previously when
[<target>].linker
was not configuredrust.use-lld
would set it torust-lld
on platforms where it should not.