Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable LTO and codegen-units = 1 optimization #20927

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,14 @@ strip = 'debuginfo'
# Exit process with SIGABRT when any thread panics
panic = 'abort'

# Same as release, but build with lto (~50min build time).
[profile.release-lto]
inherits = "release"
# Enable Link Time Optimization for better runtime performance
lto = true
# Use single codegen unit to enable better optimizations
codegen-units = 1
kiwamizamurai marked this conversation as resolved.
Show resolved Hide resolved

# Same as release, but build binary with debug symbols (binary size will be ~ 1GB).
[profile.release-dbgsym]
inherits = "release"
Expand Down
Loading