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

Rust Programming

8159 readers
8 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
[–] BB_C@programming.dev 6 points 5 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"]