-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Use a faster linker by default in the compiler profile #103541
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
@rustbot label +A-bootstrap |
Note that on |
Have you tried to use |
Seems there is a argument error for = note: "/usr/local/bin/mold" "-m64" "/tmp/rustcQNhAzy/symbols.o" ............
= note: mold: fatal: unknown -m argument: 64 |
Nevermind, I didn't actually read what this issue is about, sorry :D The point below still stands though. I don't think that it would be that useful to use |
Yeah, you're right I don't think mold does optimizations beyond what lld does so it probably wouldn't make a difference to end users. |
rustc probably doesn't know how to drive mold yet, but |
On Linux, LLD is now the default on stages >= 1. For stage 0, LLD can help quite a lot for incremental rebuilds, but bootstrap currently doesn't support using the self-contained LLD linker. This means that if we switched the default, rustc would fail to compile unless you have a |
By default for the compiler profile, we use the default system linker to compile the compiler. While this is the easiest solution that will work in the most cases, it's usually rather slow.
There is a
rust.use-lld
option inconfig.toml
which can significantly speed up incremental builds and should be on by default.This will work fine on Linux and should also work fine on Windows, but LLD on MacOS isn't well maintained and has issues so it should not be used by default. A better option here would be zld (there are two zlds out there, this is the right one). On Linux (and on MacOS once it's released), we may also be able to use
mold
, which is even faster and could make another difference.The text was updated successfully, but these errors were encountered: