diff options
| author | bors <bors@rust-lang.org> | 2023-11-09 07:02:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-09 07:02:20 +0000 |
| commit | 492e57c6adeb9e7635e9dfb7bab591997edd7f98 (patch) | |
| tree | 4b70853d0b5833ad99e75e214c352494a4ea953f /src | |
| parent | d8dbf7ca0ee9c6da0fd039b1eb8cf7c7cb840f43 (diff) | |
| parent | f5195c52bb9affdcba68165e2e0bdbc63e6e580c (diff) | |
| download | rust-492e57c6adeb9e7635e9dfb7bab591997edd7f98.tar.gz rust-492e57c6adeb9e7635e9dfb7bab591997edd7f98.zip | |
Auto merge of #117736 - TaKO8Ki:rollup-fjrtmlb, r=TaKO8Ki
Rollup of 6 pull requests Successful merges: - #116762 (Fixup `Atomic*::from_ptr` safety docs) - #117645 (Extend builtin/auto trait args with error when they have >1 argument) - #117694 (Move `BorrowedBuf` and `BorrowedCursor` from `std:io` to `core::io`) - #117705 (triagebot.toml: use inclusive language) - #117723 (speed up `x clean`) - #117724 (Restore rustc shim error message) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/src/bin/rustc.rs | 3 | ||||
| -rw-r--r-- | src/bootstrap/src/core/build_steps/clean.rs | 1 | ||||
| -rw-r--r-- | src/bootstrap/src/utils/bin_helpers.rs | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/bootstrap/src/bin/rustc.rs b/src/bootstrap/src/bin/rustc.rs index 3041fd37ac8..e3c010eb49c 100644 --- a/src/bootstrap/src/bin/rustc.rs +++ b/src/bootstrap/src/bin/rustc.rs @@ -32,6 +32,9 @@ fn main() { let args = env::args_os().skip(1).collect::<Vec<_>>(); let arg = |name| args.windows(2).find(|args| args[0] == name).and_then(|args| args[1].to_str()); + // We don't use the stage in this shim, but let's parse it to make sure that we're invoked + // by bootstrap, or that we provide a helpful error message if not. + bin_helpers::parse_rustc_stage(); let verbose = bin_helpers::parse_rustc_verbose(); // Detect whether or not we're a build script depending on whether --target diff --git a/src/bootstrap/src/core/build_steps/clean.rs b/src/bootstrap/src/core/build_steps/clean.rs index 679770ce0ec..1f0ca2ac5c8 100644 --- a/src/bootstrap/src/core/build_steps/clean.rs +++ b/src/bootstrap/src/core/build_steps/clean.rs @@ -139,7 +139,6 @@ fn clean_specific_stage(build: &Build, stage: u32) { fn clean_default(build: &Build) { rm_rf(&build.out.join("tmp")); rm_rf(&build.out.join("dist")); - rm_rf(&build.out.join("bootstrap")); rm_rf(&build.out.join("rustfmt.stamp")); for host in &build.hosts { diff --git a/src/bootstrap/src/utils/bin_helpers.rs b/src/bootstrap/src/utils/bin_helpers.rs index b9177c490ac..ab41a6b9600 100644 --- a/src/bootstrap/src/utils/bin_helpers.rs +++ b/src/bootstrap/src/utils/bin_helpers.rs @@ -18,7 +18,6 @@ pub(crate) fn parse_rustc_verbose() -> usize { /// Parses the value of the "RUSTC_STAGE" environment variable and returns it as a `String`. /// /// If "RUSTC_STAGE" was not set, the program will be terminated with 101. -#[allow(unused)] pub(crate) fn parse_rustc_stage() -> String { std::env::var("RUSTC_STAGE").unwrap_or_else(|_| { // Don't panic here; it's reasonable to try and run these shims directly. Give a helpful error instead. |
