split max build optimisations into release-high-perf
build profile
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
a85ebdeaa0
commit
0252e9c2c7
1 changed files with 13 additions and 8 deletions
21
Cargo.toml
21
Cargo.toml
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue