From a2408f353ba27b42abdfd3c1d13d9344566779d7 Mon Sep 17 00:00:00 2001 From: Julia Ryan Date: Fri, 25 Jul 2025 08:12:55 -0500 Subject: [PATCH] Don't separately rebuild crates for the build platform (#35084) macos: - `cargo build`: 1838 -> 1400 - `cargo build -r`1891 -> 1400 linux: - `cargo build`: 1893 -> 1455 - `cargo build -r`: 1893 -> 1455 windows: - `cargo build`: 1830 -> 1392 - `cargo build -r`: 1880 -> 1392 We definitely want this change for debug builds, for release builds it's _possible_ that it pessimizes the critical path, but we'll see if it impacts CI times before merging. Release Notes: - N/A --------- Co-authored-by: Rahul Butani --- Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 9062950127..ea01003f36 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -720,6 +720,11 @@ workspace-hack = { path = "tooling/workspace-hack" } split-debuginfo = "unpacked" codegen-units = 16 +# mirror configuration for crates compiled for the build platform +# (without this cargo will compile ~400 crates twice) +[profile.dev.build-override] +codegen-units = 16 + [profile.dev.package] taffy = { opt-level = 3 } cranelift-codegen = { opt-level = 3 }