# NOTE: For maximum performance, build using a nightly version of rustc.
# If you’re using a stable rustc, remove the `-Z` flags (e.g.
# `"-Zshare-generics=y"`) below.

[target.x86_64-unknown-linux-gnu]
# I apologise for the `-14` thing LOL. You can remove/change it for your own
# development builds, if necessary.
linker = "clang-14"
rustflags = ["-Clink-arg=-fuse-ld=lld-14", "-Zshare-generics=y"]

# NOTE: You must manually install <https://github.com/michaeleisel/zld> on
# macOS. You can easily do this via the `brew` package manager:
#
#     brew install michaeleisel/zld/zld
#
[target.x86_64-apple-darwin]
rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/zld", "-Zshare-generics=y"]

[target.aarch64-apple-darwin]
rustflags = [
    "-C",
    "link-arg=-fuse-ld=/opt/homebrew/bin/zld",
    "-Zshare-generics=y",
]

[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"
rustflags = ["-Zshare-generics=n"]

[profile.dev]
debug = 1
