-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
For compiletests, use the linker if present. #109544
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
I suspect this fix is too crude, but I'm not familiar enough with the code to do better. Nevertheless, I wanted to document the problem and propose something concrete. |
Hello. Do you have any feedback or suggestions on this? |
Thanks for the PR and sorry for the delay. |
📌 Commit 64225f5a8d90ebef1e3962b1063af3ff2f45dd2c has been approved by It is now in the queue for this repository. |
Maybe squash the commits first so that there is no submodule change ? |
My bad. |
Thanks for the review. I'm actually not sure this is ready to be committed. The reason is that there is code elsewhere that adds |
When running x.py test tests/ui with a custom linker script, we found that 204 tests actually invoke the default linker (/usr/bin/ld) instead of the linker script. Depending on the system linker, this will cause those tests to fail. Many of the failing tests (196) use "// aux-build:..." directives. One such example is tests/ui/annotate-snippet/multispan.rs. In cases where there were failures, we ran with -v and confirmed that we saw "linker: Some(<path deleted>)" when the compiletest configuration was dumped. Nevertheless, the rustc command lines for the failing tests did not contain -Clinker=XXX, resulting in errors like the following: = note: /usr/bin/ld: /path/to/libunwind.a(UnwindLevel1-gcc-ext.o): unrecognized relocation (0x2a) in section `.text._Unwind_GetDataRelBase' /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status
@jfgoog: 🔑 Insufficient privileges: not in try users |
Could not assign reviewer from: |
Just following up again. My original thinking with this CL was that if we went to the trouble of specifying a custom linker, we should use it when running the tests. But I'm not sure if this is excessive, or counter to the intention of allowing a linker to be passed to the test runner. What are your thoughts? |
Following up from chat in t-infra/bootstrap: Current theory is that the host could have a custom linker as well, and there is no way to pass that from the bootstrap code, only the target linker. So the logic for |
Superseded by #110018 |
When running
x.py test tests/ui
with a custom linker script, we found that 204 tests actually invoke the default linker (/usr/bin/ld) instead of the linker script. Depending on the system linker, this will cause those tests to fail. Many of the failing tests (196) use// aux-build:...
directives. One such example is tests/ui/annotate-snippet/multispan.rs.In cases where there were failures, we ran with -v and confirmed that we saw "
linker: Some(<path deleted>)
" when the compiletest configuration was dumped. Nevertheless, the rustc command lines for the failing tests did not contain-Clinker=XXX
, resulting in errors like the following: