Skip to content

Commit a9e2dee

Browse files
committed
Change recommended linker: zld to lld for MacOS (#7496)
# Objective Stop recommending zld on MacOS Fixes #7299 ## Solution - Add instructions to install lld for MacOS
1 parent 7e0a9bf commit a9e2dee

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.cargo/config_fast_builds

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,21 @@
77
linker = "clang"
88
rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zshare-generics=y"]
99

10-
# NOTE: you must manually install https://github.com/michaeleisel/zld on mac. you can easily do this with the "brew" package manager:
11-
# `brew install michaeleisel/zld/zld`
10+
# NOTE: you must install [Mach-O LLD Port](https://lld.llvm.org/MachO/index.html) on mac. you can easily do this by installing llvm which includes lld with the "brew" package manager:
11+
# `brew install llvm`
1212
[target.x86_64-apple-darwin]
13-
rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/zld", "-Zshare-generics=y"]
13+
rustflags = [
14+
"-C",
15+
"link-arg=-fuse-ld=/usr/local/opt/llvm/bin/ld64.lld",
16+
"-Zshare-generics=y",
17+
]
1418

1519
[target.aarch64-apple-darwin]
16-
rustflags = ["-C", "link-arg=-fuse-ld=/opt/homebrew/bin/zld", "-Zshare-generics=y"]
20+
rustflags = [
21+
"-C",
22+
"link-arg=-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld",
23+
"-Zshare-generics=y",
24+
]
1725

1826
[target.x86_64-pc-windows-msvc]
1927
linker = "rust-lld.exe"

0 commit comments

Comments
 (0)