diff options
| author | bors <bors@rust-lang.org> | 2021-06-07 00:01:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-06-07 00:01:10 +0000 |
| commit | 69e2f23a41f3bb5cb49e3dc66160f3888d871917 (patch) | |
| tree | 66314bbf9882c29571d0cb590d532e28f47f3be3 /src/bootstrap | |
| parent | 35fff69d043b1c0f5c29894e7f4b0da8b039c131 (diff) | |
| parent | 487200b4380b478a5052ab5bc14a63d03bd89b92 (diff) | |
Auto merge of #86080 - GuillaumeGomez:rollup-vb5g14e, r=GuillaumeGomez
Rollup of 8 pull requests Successful merges: - #83433 (Pass --cfg=bootstrap for proc macros built by stage0) - #84940 (Don't run sanity checks for `x.py setup`) - #85912 (Use `Iterator::any` and `filter_map` instead of open-coding them) - #85965 (Remove dead code from `LocalAnalyzer`) - #86010 (Fix two ICEs in the parser) - #86040 (Fix display for search results) - #86058 (Remove `_` from E0121 diagnostic suggestions) - #86077 (Fix corrected example in E0759.md) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 7 | ||||
| -rw-r--r-- | src/bootstrap/lib.rs | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 4b98abfb308..ac8bbfe102d 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -124,6 +124,13 @@ fn main() { cmd.arg("-C").arg("target-feature=-crt-static"); } } + + if stage == "0" { + // Cargo doesn't pass RUSTFLAGS to proc_macros: + // https://github.com/rust-lang/cargo/issues/4423 + // Set `--cfg=bootstrap` explicitly instead. + cmd.arg("--cfg=bootstrap"); + } } if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") { diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 1ea29a829c2..21c7dd11d24 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -444,8 +444,13 @@ impl Build { build.verbose("finding compilers"); cc_detect::find(&mut build); - build.verbose("running sanity check"); - sanity::check(&mut build); + // When running `setup`, the profile is about to change, so any requirements we have now may + // be different on the next invocation. Don't check for them until the next time x.py is + // run. This is ok because `setup` never runs any build commands, so it won't fail if commands are missing. + if !matches!(build.config.cmd, Subcommand::Setup { .. }) { + build.verbose("running sanity check"); + sanity::check(&mut build); + } // If local-rust is the same major.minor as the current version, then force a // local-rebuild |
