| 1 | [profile.release] |
| 2 | lto = "fat" |
| 3 | codegen-units = 1 |
| 4 | |
| 5 | [profile.release-with-debug] |
| 6 | inherits = "release" |
| 7 | debug = true |
| 8 | # Prioritize compile time over runtime performance |
| 9 | codegen-units = 16 |
| 10 | lto = "thin" |
| 11 | |
| 12 | [target.'cfg(all())'] |
| 13 | rustflags = [ |
| 14 | "-Wclippy::all", |
| 15 | "-Wclippy::style", |
| 16 | "-Wclippy::fallible_impl_from", |
| 17 | "-Wclippy::manual_let_else", |
| 18 | "-Wclippy::redundant_pub_crate", |
| 19 | "-Wclippy::string_add_assign", |
| 20 | "-Wclippy::string_add", |
| 21 | "-Wclippy::string_lit_as_bytes", |
| 22 | "-Wclippy::string_to_string", |
| 23 | "-Wclippy::use_self", |
| 24 | "-Dclippy::cargo", |
| 25 | "-Dclippy::dbg_macro", |
| 26 | # not too much we can do to avoid multiple crate versions |
| 27 | "-Aclippy::multiple-crate-versions", |
| 28 | "-Aclippy::wildcard_dependencies", |
| 29 | ] |
| 30 | |
| 31 | [target.x86_64-unknown-linux-gnu] |
| 32 | rustflags = ["-C", "target-cpu=haswell", "-C", "target-feature=+avx2,+fma,+f16c"] |
| 33 | |
| 34 | [target.aarch64-apple-darwin] |
| 35 | rustflags = ["-C", "target-cpu=apple-m1", "-C", "target-feature=+neon,+fp16,+fhm,+dotprod"] |
| 36 | |
| 37 | # Not all Windows systems have the C runtime installed, so this avoids library |
| 38 | # not found errors on systems that are missing it. |
| 39 | [target.x86_64-pc-windows-msvc] |
| 40 | rustflags = ["-Ctarget-feature=+crt-static"] |