diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-08-20 13:46:21 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-08-30 15:28:39 +0200 |
| commit | 542e750e5159ea85e0b7b9bf1cb743011cf286cf (patch) | |
| tree | 7db0a96b3728ca61174c7c05ba9490765716b785 | |
| parent | 65b7cde18ca7c331e323ace7b5f4f78b8cca4c33 (diff) | |
| download | rust-542e750e5159ea85e0b7b9bf1cb743011cf286cf.tar.gz rust-542e750e5159ea85e0b7b9bf1cb743011cf286cf.zip | |
Forbid running tests on stage 0 unless `build.compiletest-allow-stage0` is enabled
| -rw-r--r-- | src/bootstrap/src/core/config/config.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index a8eb563015f..450f325f1a9 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -1002,12 +1002,18 @@ impl Config { (0, Subcommand::Install) => { check_stage0("install"); } + (0, Subcommand::Test { .. }) if build_compiletest_allow_stage0 != Some(true) => { + eprintln!( + "ERROR: cannot test anything on stage 0. Use at least stage 1. If you want to run compiletest with an external stage0 toolchain, enable `build.compiletest-allow-stage0`." + ); + exit!(1); + } _ => {} } if flags_compile_time_deps && !matches!(flags_cmd, Subcommand::Check { .. }) { eprintln!( - "WARNING: Can't use --compile-time-deps with any subcommand other than check." + "ERROR: Can't use --compile-time-deps with any subcommand other than check." ); exit!(1); } |
