-
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
The illumos linker does not support --strip-debug #102418
Conversation
r? @nagisa (rust-highfive has picked a reviewer for you, use r? to override) |
if self.sess.target.os != "illumos" { | ||
self.linker_arg("--strip-debug"); | ||
} |
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 believe the intended solution here would be to invoke an external tool after linking that could do this, similar to the handling for macOS as introduced in #82037.
You probably could just reuse the code path there, for the time being. That way when somebody gets to fixing the way we represent linkers in rustc, illumos will get automatically handled the mostly “right” way alongside with macOS (though you should still keep the comment to the effect that illumos does support --strip-all
and could be improved to use that too)
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.
Thanks for taking a look at this. I've pushed a new commit which uses the linker's --strip-all
but invokes an external strip
utility for the --strip-debug
case. After talking to people who know more about linkers than I do, they advised that it is best to let the linker do this when possible, hence the hybrid approach.
It may be that the illumos linker can be extended in the future to support --strip-debug
but until then this seems like the best approach, and I'd like people to be able to successfully run the tests on illumos again.
709ea1b
to
f8a3dc4
Compare
@bors r+ Seems OK. |
…agisa The illumos linker does not support --strip-debug When building and testing rust 1.64.0 on illumos, we saw a large number of failing tests associated with: ``` = note: ld: fatal: unrecognized option '--strip-debug' ld: fatal: use the -z help option for usage information collect2: error: ld returned 1 exit status ``` The illumos linker does not support the `--strip-debug` option (although it does support `--strip-all`).
This needs to run rustfmt (somehow CI didn't run on this PR): #102865 (comment) |
f8a3dc4
to
bb244df
Compare
bb244df
to
f3deac2
Compare
I've run nightly rustfmt on
|
Don't run your local rustfmt manually, it won't be the correct version and you'll miss parameters (e.g. the edition), causing the errors above. Use |
Thanks, I've run that, it exited cleanly and made no changes.
|
That means the formatting changes you pushed earlier fixed all the formatting issues (and So the branch is now correctly formatted. Tidy passes, CI is green. |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (a24a020): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
The illumos linker does not support --strip-debug When building and testing rust 1.64.0 on illumos, we saw a large number of failing tests associated with: ``` = note: ld: fatal: unrecognized option '--strip-debug' ld: fatal: use the -z help option for usage information collect2: error: ld returned 1 exit status ``` The illumos linker does not support the `--strip-debug` option (although it does support `--strip-all`).
When building and testing rust 1.64.0 on illumos, we saw a large number of failing tests associated with:
The illumos linker does not support the
--strip-debug
option (although it does support--strip-all
).