How do I explicitly use the default Rust linker?

⚓ Rust    📅 2025-09-09    👤 surdeus    👁️ 8      

surdeus

Warning

This post was published 64 days ago. The information described in this article may have changed.

I've set up mold as my default linker in $HOME/.cargo/config.toml

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

How do I fall back to the default Rust linter for a single project?

I've tried setting linker = "" / "clang" / "gcc" / "ld" / "ldd" and rustflags = [], but no combination seems to works.

1 post - 1 participant

Read full topic

🏷️ Rust_feed