-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
rustbuild: Remove one LLD workaround #76127
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
UPD: Caused by #72145, I had Full ./x.py test src/test/ui
|
With |
@petrochenkov can you obtain stack trace from hanged LLD on windows-gnu? I suppose it will look like LLD -> libstdc++ -> winpthreads -> Windows DLLs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with nit resolved (whether I'm right about it or not)
let can_use_lld = mode != Mode::Std; | ||
|
||
if let Some(host_linker) = self.linker(compiler.host, can_use_lld) { | ||
if let Some(host_linker) = self.linker(compiler.host, true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we always pass true now, could we drop that arg as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test suite is still run without explicit linker because there are tests that check linker search etc.
Perhaps we could switch to LLD there as well, but it may require adjusting some tests.
I'll try to do it in a separate PR.
📌 Commit 21c624a has been approved by |
@petrochenkov I won't mind process dump or steps to reproduce it either, whatever is easiest for you. |
@mati865 [rust]
use-lld = true in |
I cannot reproduce the hang:
If you encounter it again stack trace or a dump would be useful. |
Rollup of 5 pull requests Successful merges: - rust-lang#75938 (Added some `min_const_generics` revisions into `const_generics` tests) - rust-lang#76050 (Remove unused function) - rust-lang#76075 (datastructures: replace `once_cell` crate with an impl from std) - rust-lang#76115 (Restore public visibility on some parsing functions for rustfmt) - rust-lang#76127 (rustbuild: Remove one LLD workaround) Failed merges: r? @ghost
@petrochenkov I can reproduce the hang with
Short explanation: ancient winpthreads library used by CI is quite buggy, this hang is caused by one of them (libstdc++ uses winpthreads for C++ multithreading). I'll try to raise topic about upgrading mingw-w64 once again... |
@mati865 |
Maybe for msvc (I haven't really investigated it) but for other targets this passes |
Ok, I'll test again and look why |
…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.
…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.
…ulacrum 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.
rustbuild: Build tests with LLD if `use-lld = true` was passed Addresses rust-lang#76127 (comment). Our test suite is generally ready to run with an explicitly specified linker (rust-lang#45191), so LLD specified with `use-lld = true` works as well. Only 4 tests fail (on `x86_64-pc-windows-msvc`): ``` ui/panic-runtime/lto-unwind.rs run-make-fulldeps/debug-assertions run-make-fulldeps/foreign-exceptions run-make-fulldeps/test-harness ``` All of them are legitimate issues with LLD (or at least with combination Rust+LLD) and manifest in segfaults on access to TLS (rust-lang#76127 (comment)). UPD: These issues are caused by rust-lang#72145 and appear because I had `-Ctarget-cpu=native` set. UPD: Further commits build tests with LLD for non-MSVC targets and propagate LLD to more places when `use-lld` is enabled.
The version of LLD shipped with Rust no longer have this issue.
Closes #68647