-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Warn when gold was used as the linker #141750
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
base: master
Are you sure you want to change the base?
Conversation
Some changes occurred in compiler/rustc_codegen_ssa |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Warn when gold was used as the linker gold has been deprecated recently and is known to behave incorrectly around Rust programs, including miscompiling `#[used(linker)]`. Tell people to switch to a different linker instead. closes #141748 opening mostly for perf for now, but feel free to review r? bjorn3
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (a1b2ee8): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -0.9%, secondary -1.2%)This 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.
CyclesResults (secondary 0.2%)This 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 780.508s -> 779.064s (-0.19%) |
This seems to consistently regress linking time by about 1ms. |
I've thought that this sort of detection may also be useful in the future to emit a warning if |
@bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Warn when gold was used as the linker gold has been deprecated recently and is known to behave incorrectly around Rust programs, including miscompiling `#[used(linker)]`. Tell people to switch to a different linker instead. closes #141748 opening mostly for perf for now, but feel free to review r? bjorn3
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (389e842): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (secondary 0.3%)This 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.
CyclesResults (secondary -0.2%)This 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: missing data |
👍 on your commit, would be nice to squash before merge |
gold has been deprecated recently and is known to behave incorrectly around Rust programs, including miscompiling `#[used(linker)]`. Tell people to switch to a different linker instead. Co-Authored-By: bjorn3 <17426603+bjorn3@users.noreply.github.com>
@bors r+ |
@bors r- |
If rustc doesn't warn about newer gold versions anymore, I think the sanity check in bootstrap should instead because of #139425. |
We could be even more clever to detect whether |
Looks like the version embedded in the binary is the gold version, not the binutils version. And the way that is versioned, is uh
bad news. the gold version is very bad news. |
so I think just warning for every version is fine. it's deprecated (and apparently literally no longer included in the latest binutils source tarball), so we can't really have a "false positive" in that sense. no one should be using it. |
Given the above, let's approve it again :) @bors r+ |
gold has been deprecated recently and is known to behave incorrectly around Rust programs, including miscompiling
#[used(linker)]
. Tell people to switch to a different linker instead.closes #141748
r? bjorn3