- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.7k
 
Description
Problem
We have a compiler + VM monorepo with a build step, where we compile a standard library to include into the executable later.
The step itself depends on the part of the monorepo, and it's dependency tree is around 700 crates. But the actual compilation is mostly happens in one compiler crate.
I want to compile that compiler crate with opt-level = 1. This way, the compilation step reduced from 70s to 20s.
But I don't want to compile with opt-level = 1 the whole set of 700 crates of build dependencies.
Proposed Solution
There already a [profile.dev.build-override] which allow to specify opt-level for the whole set of [build-dependencies].
There's also [profile.dev.package] which allows specifying compiler.opt-level = 1.
I want to have
[profile.dev.build-override.package]
compiler.opt-level = 1
which combines those two together.
Notes
The idea has been mentioned before in #7940, but the discussion there seem to be focused on the library crates.
I want to control the opt-level myself.
I can contribute the feature if it deemed acceptable - building blocks are already in-place.