2023-08-29 18:16:49 +10:00
|
|
|
# On Windows
|
|
|
|
# ```
|
|
|
|
# cargo install -f cargo-binutils
|
|
|
|
# rustup component add llvm-tools-preview
|
|
|
|
# ```
|
|
|
|
[target.x86_64-pc-windows-msvc]
|
|
|
|
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
|
|
|
|
[target.x86_64-pc-windows-gnu]
|
|
|
|
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
|
|
|
|
|
|
|
|
# On Linux:
|
|
|
|
# - Ubuntu, `sudo apt-get install lld clang`
|
|
|
|
# - Arch, `sudo pacman -S lld clang`
|
|
|
|
[target.x86_64-unknown-linux-gnu]
|
|
|
|
rustflags = ["-C", "linker=clang", "-C", "link-arg=-fuse-ld=lld"]
|
|
|
|
|
|
|
|
# On MacOS, `brew install michaeleisel/zld/zld`
|
2023-08-29 21:43:54 +10:00
|
|
|
# [target.x86_64-apple-darwin]
|
|
|
|
# rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/zld"]
|
2023-08-29 18:16:49 +10:00
|
|
|
|
|
|
|
[target.aarch64-apple-darwin]
|
2023-08-29 21:43:54 +10:00
|
|
|
rustflags = ["-C", "link-arg=-fuse-ld=/opt/homebrew/Cellar/llvm/16.0.6/bin/ld64.lld"]
|