Assume the effects of RUSTC_BOOTSTRAP in sysroot #151684
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cc rust-lang/rfcs#3874
In the build-std: always RFC, it is proposed that
RUSTC_BOOTSTRAPshould be implied for compilation of any crate located in the sysroot. As such, Cargo would not need to setRUSTC_BOOTSTRAPfor build-std, but also external projects like Rust for Linux that buildcorefrom therust-srccomponent could do so on a stable toolchain.This functionality is only intended for use with unmodified standard library sources, and that should probably be document somewhere but I'm not sure where -
RUSTC_BOOTSTRAPis mentioned in the unstable book, maybe with that? It might make more sense in the rustc book but there's not an obvious spot.As rust-lang/rfcs#3874 is not yet accepted, if this warrants an MCP to be implemented in the interim, then I'd be happy to submit one.
It is unclear exactly how to test this, as it would require rustc be from a stable toolchain to test the relevant behaviours, and that's not how the test suite is set up. None of the current tests for
RUSTC_BOOTSTRAPcan be adapted for this.r? @wesleywiser