Skip to content

Commit e127559

Browse files
committed
Give linker config for Mold
1 parent 28482fe commit e127559

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/src/development/linux.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you are looking to develop Zed collaboration features using a local collabora
2424

2525
On most Linux distributions, the default linker is GNU ld. Newer linkers, especially [Wild](https://github.com/davidlattimore/wild) and [Mold](https://github.com/rui314/mold) can significantly improve clean and incremental build time.
2626

27-
At present Zed uses Mold in CI because it's more mature. For local development Wild is recommended because it's 5-20% faster.
27+
At present Zed uses Mold in CI because it's more mature. For local development Wild is recommended because it's 5-20% faster than Mold.
2828

2929
These linkers can be installed with `script/install-mold` and `script/install-wild`.
3030

@@ -34,6 +34,17 @@ To use Wild as your default, add these lines to your `~/.cargo/config.toml`:
3434
[target.x86_64-unknown-linux-gnu]
3535
linker = "clang"
3636
rustflags = ["-C", "link-arg=--ld-path=wild"]
37+
38+
[target.aarch64-unknown-linux-gnu]
39+
linker = "clang"
40+
rustflags = ["-C", "link-arg=--ld-path=wild"]
41+
```
42+
43+
To use Mold as your default:
44+
45+
```toml
46+
[target.'cfg(target_os = "linux")']
47+
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
3748
```
3849

3950
## Building from source

0 commit comments

Comments
 (0)