Don't separately rebuild crates for the build platform (#35084)
Julia Ryan
and
Rahul Butani
created
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 <rrbutani@users.noreply.github.com>
Change summary
Cargo.toml | 5 +++++
1 file changed, 5 insertions(+)
Detailed changes
@@ -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 }