diff options
| author | bors <bors@rust-lang.org> | 2022-05-22 16:47:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-22 16:47:17 +0000 |
| commit | 0a437b2ca081bc12425a3318cb66aade9824cbae (patch) | |
| tree | e5bb27cf96f011cdd4f12b3fbc5471bb1241875d /src/bootstrap | |
| parent | 4bb4dc4672b4d80509db4c0572ae8ceeaf7d4a1c (diff) | |
| parent | b392cdf7de4cd8413f24ce77bf04dd646a60d79d (diff) | |
| download | rust-0a437b2ca081bc12425a3318cb66aade9824cbae.tar.gz rust-0a437b2ca081bc12425a3318cb66aade9824cbae.zip | |
Auto merge of #97283 - jackh726:rollup-ga84p7n, r=jackh726
Rollup of 5 pull requests Successful merges: - #97043 (Move some tests to more reasonable directories) - #97206 (Do leak check after function pointer coercion) - #97275 (small change) - #97277 (Avoid accidentally enabling unstable features in compilers (take 2)) - #97280 (Quote replace target in bootstrap configure) Failed merges: - #97214 (Finish bumping stage0) r? `@ghost` `@rustbot` modify labels: rollup
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. |
