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 <rrbutani@users.noreply.github.com>
This commit is contained in:
Julia Ryan 2025-07-25 08:12:55 -05:00 committed by GitHub
parent 9071341a1d
commit a2408f353b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 }