Speed up builds by using thin LTO and default codegen-units for release builds (#5879)

This commit is contained in:
Quentin Gliech authored and GitHub committed 2026-07-28 18:50:17 +02:00
commit 7aaaaa0ee1
1 file changed
+6 -2
+6 -2
View File
@@ -744,8 +744,12 @@ version = "1.8.2"
version = "3.1.0"
[profile.release]
codegen-units = 1 # Reduce the number of codegen units to increase optimizations
lto = true # Enable fat LTO
# This is not the most performant build we could possibly do, but other
# optimisations like `codegen-units = 1` and fat LTO are quite expensive on
# compilation time, with relatively modest perf advantages over just thin LTO
# (we saw 3-5% perf difference) and we'd rather optimize for compilation time
# at the moment.
lto = "thin"
# A few profile opt-level tweaks to make the test suite run faster
[profile.dev.package]