Skip to content

Commit 43764ab

Browse files
chore: restore lld linker
1 parent 3710030 commit 43764ab

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.cargo/config.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[alias]
2+
xtask = "run --package xtask --"
3+
4+
# On Windows
5+
# ```
6+
# cargo install -f cargo-binutils
7+
# rustup component add llvm-tools-preview
8+
# ```
9+
[target.x86_64-pc-windows-msvc]
10+
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
11+
12+
[target.x86_64-pc-windows-gnu]
13+
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
14+
15+
# On Linux:
16+
# - Ubuntu, `sudo apt-get install lld clang`
17+
# - Arch, `sudo pacman -S lld clang`
18+
[target.x86_64-unknown-linux-gnu]
19+
rustflags = ["-C", "linker=clang", "-C", "link-arg=-fuse-ld=lld"]
20+
21+
[target.aarch64-unknown-linux-gnu]
22+
rustflags = ["-C", "linker=clang", "-C", "link-arg=-fuse-ld=lld"]
23+
24+
[target.x86_64-unknown-linux-musl]
25+
rustflags = ["-C", "linker=clang", "-C", "link-arg=-fuse-ld=lld"]
26+
27+
[target.aarch64-unknown-linux-musl]
28+
rustflags = ["-C", "linker=clang", "-C", "link-arg=-fuse-ld=lld"]
29+
30+
# On MacOS, `brew install llvm` and follow steps in `brew info llvm`
31+
[target.x86_64-apple-darwin]
32+
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
33+
34+
[target.aarch64-apple-darwin]
35+
rustflags = ["-C", "link-arg=-fuse-ld=lld"]

0 commit comments

Comments
 (0)