Avoid accidentally enabling unstable features in compilers (take 2)
This allows rustbuild to control whether crates can use nightly features or not. It also prevents rustbuild from using nightly features itself.
This commit is contained in:
parent
30f3860875
commit
b0ea4e74cb
@ -1171,7 +1171,6 @@ def bootstrap(help_triggered):
|
||||
env = os.environ.copy()
|
||||
env["BOOTSTRAP_PARENT_ID"] = str(os.getpid())
|
||||
env["BOOTSTRAP_PYTHON"] = sys.executable
|
||||
env["RUSTC_BOOTSTRAP"] = '1'
|
||||
if build.rustc_commit is not None:
|
||||
env["BOOTSTRAP_DOWNLOAD_RUSTC"] = '1'
|
||||
run(args, env=env, verbose=build.verbose, is_bootstrap=True)
|
||||
|
@ -881,6 +881,10 @@ fn run(self, builder: &Builder<'_>) {
|
||||
if self.validate {
|
||||
cmd.arg("--validate");
|
||||
}
|
||||
if !builder.unstable_features() {
|
||||
// We need to validate nightly features, even on the stable channel.
|
||||
cmd.env("RUSTC_BOOTSTRAP", "1");
|
||||
}
|
||||
// If the lib directories are in an unusual location (changed in
|
||||
// config.toml), then this needs to explicitly update the dylib search
|
||||
// path.
|
||||
|
Loading…
Reference in New Issue
Block a user