Skip to content

Commit

Permalink
expand on how to revert to system linker
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Apr 27, 2024
1 parent cd61b4f commit afbb1fd
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions posts/2024-05-01-enabling-rust-lld-on-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,14 @@ resource-constrained environments.

rustc will use `rust-lld` on `x86_64-unknown-linux-gnu` nightlies, for much improved linking times.
Let us know if you encounter problems, by [opening an
issue](https://github.com/rust-lang/rust/issues/new/choose) on github. If that happens, you can
revert to the default linker with the `-Z linker-features=-lld` flag.
issue](https://github.com/rust-lang/rust/issues/new/choose) on github.

If that happens, you can revert to the default linker with the `-Z linker-features=-lld` flag.
Either by adding it to the usual `RUSTFLAGS` environment variable, or to a project's
[`.cargo/config.toml`](https://doc.rust-lang.org/cargo/reference/config.html) configuration file,
like so:

```toml
[target.x86_64-unknown-linux-gnu]
rustflags = ["-Zlinker-features=-lld"]
```

0 comments on commit afbb1fd

Please sign in to comment.