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

Rust Programming

7938 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.

top 1 comments
sorted by: hot top controversial new old
[–] [email protected] 6 points 3 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"]