Skip to content

Commit 3048886

Browse files
committed
Auto merge of #144692 - samueltardieu:rollup-0j1y08x, r=samueltardieu
Rollup of 4 pull requests Successful merges: - #143465 (Support multiple crate versions in --extern-html-root-url) - #144308 ([rustdoc] Display total time and compilation time of merged doctests) - #144655 (clean up codegen fn attrs) - #144675 (Reject running `compiletest` self-tests against stage 0 rustc unless explicitly allowed) r? `@ghost` `@rustbot` modify labels: rollup
2 parents e5e79f8 + 202d1f5 commit 3048886

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+665
-378
lines changed

bootstrap.example.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,11 @@
465465
# What custom diff tool to use for displaying compiletest tests.
466466
#build.compiletest-diff-tool = <none>
467467

468+
# Whether to allow `compiletest` self-tests and `compiletest`-managed test
469+
# suites to be run against the stage 0 rustc. This is only intended to be used
470+
# when the stage 0 compiler is actually built from in-tree sources.
471+
#build.compiletest-allow-stage0 = false
472+
468473
# Whether to use the precompiled stage0 libtest with compiletest.
469474
#build.compiletest-use-stage0-libtest = true
470475

compiler/rustc_codegen_cranelift/scripts/setup_rust_fork.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ rustc = "$(pwd)/../dist/bin/rustc-clif"
3333
cargo = "$(rustup which cargo)"
3434
full-bootstrap = true
3535
local-rebuild = true
36+
compiletest-allow-stage0 = true
3637
3738
[rust]
3839
download-rustc = false

compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,5 +166,5 @@ index 073116933bd..c3e4578204d 100644
166166
EOF
167167

168168
echo "[TEST] rustc test suite"
169-
COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 --test-args=--no-capture tests/{codegen-units,run-make,ui,incremental}
169+
./x.py test --stage 0 --test-args=--no-capture tests/{codegen-units,run-make,ui,incremental}
170170
popd

compiler/rustc_codegen_gcc/build_system/src/test.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,6 @@ fn asm_tests(env: &Env, args: &TestArg) -> Result<(), String> {
561561
// FIXME: create a function "display_if_not_quiet" or something along the line.
562562
println!("[TEST] rustc asm test suite");
563563

564-
env.insert("COMPILETEST_FORCE_STAGE0".to_string(), "1".to_string());
565-
566564
let codegen_backend_path = format!(
567565
"{pwd}/target/{channel}/librustc_codegen_gcc.{dylib_ext}",
568566
pwd = std::env::current_dir()
@@ -588,6 +586,8 @@ fn asm_tests(env: &Env, args: &TestArg) -> Result<(), String> {
588586
&"always",
589587
&"--stage",
590588
&"0",
589+
&"--set",
590+
&"build.compiletest-allow-stage0=true",
591591
&"tests/assembly-llvm/asm",
592592
&"--compiletest-rustc-args",
593593
&rustc_args,
@@ -1047,7 +1047,6 @@ where
10471047

10481048
// FIXME: create a function "display_if_not_quiet" or something along the line.
10491049
println!("[TEST] rustc {test_type} test suite");
1050-
env.insert("COMPILETEST_FORCE_STAGE0".to_string(), "1".to_string());
10511050

10521051
let extra =
10531052
if args.is_using_gcc_master_branch() { "" } else { " -Csymbol-mangling-version=v0" };
@@ -1070,6 +1069,8 @@ where
10701069
&"always",
10711070
&"--stage",
10721071
&"0",
1072+
&"--set",
1073+
&"build.compiletest-allow-stage0=true",
10731074
&format!("tests/{test_type}"),
10741075
&"--compiletest-rustc-args",
10751076
&rustc_args,

0 commit comments

Comments
 (0)