Support opt-level ranges to avoid building twice with different opt-level values #8502
Labels
A-profiles
Area: profiles
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-triage
Status: This issue is waiting on initial triage.
#8500 will change Cargo's default opt-level for build dependencies to 0. However, if a crate will also be built as a runtime dependency, that would result in Cargo building it twice, once with opt-level 0 and once with opt-level 3. We should have a way of specifying the default as having a minimum opt-level of 0, but allowing a higher opt-level. Then, Cargo could unify that and just build once, leaving build-time-only dependencies unoptimized, but optimizing dependencies shared between build-time and runtime.
The text was updated successfully, but these errors were encountered: