-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Investigate the impact of using Gold for linking rather than the default linker on systems where it is available #29938
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
Comments
Another thread: https://internals.rust-lang.org/t/how-to-move-to-the-gold-linker-on-linux/2576 I've done tests against servo, and on servo the wins were big - they now customize their build to prefer gold. I also have a patch that defaults to gold and am running it through crater to look for regressions now. |
Everything that crater can build appears to build under gold. |
|
@brson I'd say making this change deserves a brief RFC (especially if it introduces new command-line arguments). I don't foresee any objections, but if there are any weird use cases that we're not considering we want to make sure this change is visible. |
I've also been perpetually anticipating the advent of LLD for the past four years, so if we go ahead with the change we may want to clarify that we reserve the right to change the default linker in the future as well. |
There's a PR open. |
Closing in favor of #30783 |
Inspired by @alexcrichton 's comment here: https://www.reddit.com/r/rust/comments/3tco32/shattering_a_crate_in_pursuit_of_compile_times/cx58vrt
First we need to gather data on how much Gold benefits compiler performance. Collect some large Rust projects and use time-passes to determine the relative impact of using different linkers. Initial results should be promising: https://www.reddit.com/r/rust/comments/3tco32/shattering_a_crate_in_pursuit_of_compile_times/cx5yrmq
If we decide that the performance win is worth it then we need to decide how best to implement this scheme. Does anyone foresee any problems with selectively preferring a linker that's not the default on a system? It has echoes of the headaches we've had with preferring jemalloc over the system allocator.
The text was updated successfully, but these errors were encountered: