[build]
# rustflags = ["-C", "target-cpu=native", "-C", "target-feature=-avx"]

[target.aarch64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold", "-C", "link-arg=-Wl,--no-rosegment"]

[target.wasm32-unknown-unknown]
rustflags = ['--cfg', 'getrandom_backend="wasm_js"']

[target.x86_64-apple-darwin]
linker = "x86_64-apple-darwin21.4-clang"
ar = "x86_64-apple-darwin21.4-ar"

[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold", "-C", "link-arg=-Wl,--no-rosegment"]

[profile.release]
lto = "thin"
panic = "abort"

[profile.bench]
inherits = "release"
panic = "unwind"

[profile.profiling]
inherits = "bench"
debug = true