[target.'cfg(all(target_arch = "aarch64", target_os = "linux"))']
rustflags = ["-C", "link-arg=-fuse-ld=lld"]

[target.'cfg(any(target_os = "windows", target_os = "macos"))']
linker = "rust-lld"

[target.'cfg(target_os = "windows")']
rustflags = ["-C", "link-arg=/STACK:8388608"]

[target.'cfg(target_arch = "x86_64")']
rustflags = ["-C", "target-cpu=x86-64-v3"]

[target.'cfg(all(target_arch = "aarch64", target_os = "macos"))']
rustflags = [
    "-C", "target-cpu=apple-m1",
    "-C", "link-arg=-headerpad_max_install_names"
]

[target.'cfg(all(target_arch = "aarch64", not(target_os = "macos")))']
rustflags = ["-C", "target-cpu=cortex-a76"]

[env]
CC = "clang"
CXX = "clang++"
AR = "llvm-ar"
SDKROOT = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk"
CMAKE_POLICY_VERSION_MINIMUM = "3.5" # for freetype
