this post was submitted on 17 May 2024
16 points (100.0% liked)

Rust Programming

8074 readers
1 users here now

founded 5 years ago
MODERATORS
 

rustc will use rust-lld by default on x86_64-unknown-linux-gnu on nightly to significantly reduce linking times.

you are viewing a single comment's thread
view the rest of the comments
[–] BB_C@programming.dev 6 points 4 months ago

Good. But a lot of us do this already:

[target.x86_64-unknown-linux-gnu]
linker = "clang" # for mold
rustflags = ["-c", "link-arg=-fuse-ld=/usr/bin/mold"]

[target.x86_64-unknown-linux-musl]
rustflags = ["-Z", "gcc-ld=lld"]