Skip to content

Commit 6c7b7f6

Browse files
committed
expand on how to revert to system linker
1 parent 0cefcae commit 6c7b7f6

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

posts/2024-05-01-enabling-rust-lld-on-linux.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,14 @@ resource-constrained environments.
8080

8181
rustc will use `rust-lld` on `x86_64-unknown-linux-gnu` nightlies, for much improved linking times.
8282
Let us know if you encounter problems, by [opening an
83-
issue](https://github.com/rust-lang/rust/issues/new/choose) on github. If that happens, you can
84-
revert to the default linker with the `-Z linker-features=-lld` flag.
83+
issue](https://github.com/rust-lang/rust/issues/new/choose) on GitHub.
84+
85+
If that happens, you can revert to the default linker with the `-Z linker-features=-lld` flag.
86+
Either by adding it to the usual `RUSTFLAGS` environment variable, or to a project's
87+
[`.cargo/config.toml`](https://doc.rust-lang.org/cargo/reference/config.html) configuration file,
88+
like so:
89+
90+
```toml
91+
[target.x86_64-unknown-linux-gnu]
92+
rustflags = ["-Zlinker-features=-lld"]
93+
```

0 commit comments

Comments
 (0)