diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2025-02-24 20:10:49 +0800 |
|---|---|---|
| committer | Jieyou Xu <jieyouxu@outlook.com> | 2025-03-07 19:07:27 +0800 |
| commit | bd884d8043b9ebd4e2bbae0e31bc4780d2e26c6a (patch) | |
| tree | 6ec1828c9587d301f4b5ab16cc86e79a23e7faf0 /src/tools | |
| parent | ec3cde249f5b5a8406dcdf6b8abc702e86e6e56b (diff) | |
| download | rust-bd884d8043b9ebd4e2bbae0e31bc4780d2e26c6a.tar.gz rust-bd884d8043b9ebd4e2bbae0e31bc4780d2e26c6a.zip | |
Prevent `rmake.rs` from using any nightly/unstable features
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/compiletest/src/runtest/run_make.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/runtest/run_make.rs b/src/tools/compiletest/src/runtest/run_make.rs index 8900752bd4b..073116933bd 100644 --- a/src/tools/compiletest/src/runtest/run_make.rs +++ b/src/tools/compiletest/src/runtest/run_make.rs @@ -105,6 +105,11 @@ impl TestCx<'_> { .expect("stage0 rustc is required to run run-make tests"); let mut rustc = Command::new(&stage0_rustc); rustc + // `rmake.rs` **must** be buildable by a stable compiler, it may not use *any* unstable + // library or compiler features. Here, we force the stage 0 rustc to consider itself as + // a stable-channel compiler via `RUSTC_BOOTSTRAP=-1` to prevent *any* unstable + // library/compiler usages, even if stage 0 rustc is *actually* a nightly rustc. + .env("RUSTC_BOOTSTRAP", "-1") .arg("-o") .arg(&recipe_bin) // Specify library search paths for `run_make_support`. |
