-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-profilesArea: profilesArea: profilesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Description
Right now, cargo build
compiles build.rs in debug mode, while cargo build --release
compiles build.rs in release mode. However build.rs scripts can potentially be very computationally intensive, and I would like the option to run my build.rs script in release mode even when doing a debug compile of the rest of my crate.
As a motivating example, nikomatsakis/lalrpop is a parser generator that does source generation during the custom build step. Just the build.rs step takes 6m30s when compiling in debug, and 33s when compiling in release for a complex grammar.
svblsvljb and purplesyringa
Metadata
Metadata
Assignees
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-profilesArea: profilesArea: profilesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.