-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Introduce perma-unstable --compile-time-deps flag #14434
Copy link
Copy link
Closed
Labels
A-build-systemArea: build system integrationArea: build system integrationC-enhancementCategory: enhancementCategory: enhancementCommand-checkE-mediumExperience: MediumExperience: MediumS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review
Metadata
Metadata
Assignees
Labels
A-build-systemArea: build system integrationArea: build system integrationC-enhancementCategory: enhancementCategory: enhancementCommand-checkE-mediumExperience: MediumExperience: MediumS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review
Type
Fields
Give feedbackNo fields configured for issues without a type.
Excerpt taken (and slight adjusted) from rust-lang/rfcs#3344:
Add a flag
--compile-time-depstocargo buildthat will cause cargo to only build proc-macros and build-scripts (and their required dependencies) of the package graph well as running the build-scripts.In case of the ecosystem introducing more compile time (executable) artifacts that are required to fully build a project, these artifacts should be included by this flag accordingly.
cargo buildwhere build scripts and proc-macros are always built for host platform.Note "as usual" here refers to the behavior of a
cargo buildinvocation without the proposed flag.The main reasoning behind this is that rust-analyzer (and likely RustRover) want to get rid of their buggy, incorrect, and cargo breaking
RUSTC_WRAPPERasap. Though as this flag requires a lot of use case collecting (outside of the IDE space) and general design iterations stabilizing it (especially in the proposed form) will take quite a long time either way so we mainly want to introduce this in some unstable form for these tools to consume for now. That does mean the IDE will likely have to employ some shenanigans to make use of this flag on stable (viaRUSTC_BOOTSTRAP=1for example) and then keeping aRUSTC_WRAPPERthat will strip that flag again before building (as to not break cursed build scripts probes).Created this as per rust-lang/rfcs#3344 (comment).