-
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
Add an option to use LLD to link the compiler on Windows platforms #68623
Conversation
I wonder about the impact on rustc's performance when it was linked with LLD vs MSVC's link.exe. The Microsoft linker is known for being good at optimizations so maybe it might be faster. Can perf runs run on Windows? |
I don't think perf runs should block this PR since it is just adding LLD as an option although if we ever did want to change the default then we'd absolutely need perf runs, and I'd be interested to see the results regardless. |
@retep998 full agree. This PR should be merged in any case. My question should not be interpreted as criticism, quite the contrary. The earlier we have performance comparisons, the earlier we can switch to LLD as default if it's faster in the benchmarks (or figure out how to make it faster if it's not). |
@bors r+ |
📌 Commit d304cd0 has been approved by |
Add an option to use LLD to link the compiler on Windows platforms Based on #68609. Using LLD is good way to improve compile times on Windows since `link.exe` is quite slow. The time for `x.py build --stage 1 src/libtest` goes from 0:12:00 to 0:08:29. Compile time for `rustc_driver` goes from 226.34s to 18.5s. `rustc_macros` goes from 28.69s to 7.7s. The size of `rustc_driver` is also reduced from 83.3 MB to 78.7 MB. r? @Mark-Simulacrum
☀️ Test successful - checks-azure |
Fwiw, official Windows builds of Firefox are all done with LLD. |
Based on #68609.
Using LLD is good way to improve compile times on Windows since
link.exe
is quite slow. The time forx.py build --stage 1 src/libtest
goes from 0:12:00 to 0:08:29. Compile time forrustc_driver
goes from 226.34s to 18.5s.rustc_macros
goes from 28.69s to 7.7s. The size ofrustc_driver
is also reduced from 83.3 MB to 78.7 MB.r? @Mark-Simulacrum