[build]
rustflags = [
    "-C", "target-cpu=native",
    "-C", "opt-level=3",
]

[target.x86_64-pc-windows-msvc]
rustflags = [
    "-C", "target-cpu=native",
    "-C", "target-feature=+avx2,+bmi1,+bmi2,+popcnt,+lzcnt,+fma",
    "-C", "opt-level=3",
    "-C", "link-args=/LTCG",
    "-C", "link-args=/OPT:REF,ICF",
]

[target.x86_64-pc-windows-gnu]
rustflags = [
    "-C", "target-cpu=native",
    "-C", "target-feature=+avx2,+bmi1,+bmi2,+popcnt,+lzcnt,+fma",
    "-C", "opt-level=3",
    "-C", "link-args=-Wl,--gc-sections",
]

[target.x86_64-unknown-linux-gnu]
rustflags = [
    "-C", "target-cpu=native",
    "-C", "target-feature=+avx2,+bmi1,+bmi2,+popcnt,+lzcnt,+fma",
    "-C", "opt-level=3",
    "-C", "link-args=-Wl,--gc-sections",
]