diff options
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 1 | ||||
| -rw-r--r-- | src/bootstrap/builder.rs | 8 | ||||
| -rwxr-xr-x | src/bootstrap/configure.py | 2 | ||||
| -rw-r--r-- | src/bootstrap/doc.rs | 4 |
4 files changed, 13 insertions, 2 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index d36344ece4e..6d46ea26e6a 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -1192,7 +1192,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) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 894d74fb269..761bd66b505 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1226,6 +1226,14 @@ impl<'a> Builder<'a> { // this), as well as #63012 which is the tracking issue for this // feature on the rustc side. cargo.arg("-Zbinary-dep-depinfo"); + match mode { + Mode::ToolBootstrap => { + // Restrict the allowed features to those passed by rustbuild, so we don't depend on nightly accidentally. + // HACK: because anyhow does feature detection in build.rs, we need to allow the backtrace feature too. + rustflags.arg("-Zallow-features=binary-dep-depinfo,backtrace"); + } + Mode::Std | Mode::Rustc | Mode::ToolStd | Mode::Codegen | Mode::ToolRustc => {} + } cargo.arg("-j").arg(self.jobs().to_string()); // Remove make-related flags to ensure Cargo can correctly set things up diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index 87a130a0982..2fc036082cb 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -407,7 +407,7 @@ if 'target' in config: configured_targets.append(target) for target in configured_targets: targets[target] = sections['target'][:] - targets[target][0] = targets[target][0].replace("x86_64-unknown-linux-gnu", target) + targets[target][0] = targets[target][0].replace("x86_64-unknown-linux-gnu", "'{}'".format(target)) def is_number(value): diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index fcef784d2d1..be6655ddb61 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -881,6 +881,10 @@ impl Step for RustcBook { 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. |
