-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Closed
Description
NB: This refers to the feature of making #[unstable] APIs unusable in release channels.
Currently, to allow bootstrap compilers to build standard library, the CFG_BOOTSTRAP_KEY environment variable (see #20663) should match some secret value decided at compile time of rustc. This has several problems:
- The key is very easy to find out (looking at build logs, running
stringsetc); - Key generation is not cross platform. On BSDs and OS Xs the generated key is well known and currently is equal to
N; - It broke snapshots.
The proposed solution is to build two different versions of rustc for stage2/3 instead, depending on the situation:
- stage2/3 src/driver/driver.rs which can process unstable libraries (e.g. using `--cfg enable_unstable);
- stage2/3 libraries are built;
- stage2/3 src/driver/driver.rs which cannot process unstable libraries;
- Proper binary is packaged/shipped depending on the channel.
This has benefits of not having to do any environment variable dance during the build. It is also not really workaround-able without manually rebuilding rustc, unlike the current approach.
(also see logs)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.