From a51923e414f05789da6c7570c7169656368b06ea Mon Sep 17 00:00:00 2001 From: jdalton Date: Mon, 12 Oct 2026 16:47:40 -0400 Subject: [PATCH] Reduce release build time Use one codegen unit for release builds based on repeated hosted build measurements. Preserve the existing effective setting for inherited profiles. Assisted-by: Codex: GPT-6 --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 873e76fdc..df6c364af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,17 +75,20 @@ ignore = "=0.4.33" strip = true lto = true opt-level = "s" +codegen-units = 1 # Test release semantics without the cost of full-LTO links for every test binary. # Shipped binaries still use [profile.release]. [profile.ci-release] inherits = "release" +codegen-units = 16 lto = false strip = "none" # unstripped test binaries => usable backtraces on failure # Benchmark with release codegen, faster thin-LTO links, and profiler symbols. [profile.perf] inherits = "release" +codegen-units = 16 lto = "thin" strip = "none" @@ -93,6 +96,7 @@ strip = "none" # in-process: release semantics without the slow full-LTO link. [profile.addon] inherits = "release" +codegen-units = 16 lto = "thin" # Optimize dependencies for test speed. Workspace crates stay unoptimized;