split max build optimisations into release-high-perf build profile

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-01-16 19:49:44 -05:00 committed by June
parent a85ebdeaa0
commit 0252e9c2c7

View file

@ -160,27 +160,32 @@ debug = 0
lto = 'off' lto = 'off'
incremental = true incremental = true
# default release profile
[profile.release] [profile.release]
lto = 'fat' lto = 'thin'
incremental = false incremental = false
codegen-units=1
opt-level = 3 opt-level = 3
overflow-checks = true overflow-checks = true
strip = "symbols" strip = "symbols"
panic = "abort" panic = "abort"
debug = 0 debug = 0
# If you want to make flamegraphs, enable debug info:
# debug = true # high performance release profile which uses fat LTO across all crates, 1 codegen unit, max opt-level, and optimises across all crates
[profile.release-high-perf]
inherits = "release"
lto = 'fat'
codegen-units = 1
# For releases also try to max optimizations for dependencies: # For releases also try to max optimizations for dependencies:
[profile.release.build-override] [profile.release-high-perf.build-override]
debug = 0 debug = 0
opt-level = 3 opt-level = 3
codegen-units=1 codegen-units = 1
[profile.release.package."*"]
[profile.release-high-perf.package."*"]
debug = 0 debug = 0
opt-level = 3 opt-level = 3
codegen-units=1 codegen-units = 1
[lints] [lints]
workspace = true workspace = true