Skip to content

Commit 514fdd0

Browse files
authored
Unrolled build for #147625
Rollup merge of #147625 - Kobzol:gcc-debug-assertions, r=GuillaumeGomez Add a warning when running tests with the GCC backend and debug assertions are enabled Discussed at https://rust-lang.zulipchat.com/#narrow/channel/233931-t-compiler.2Fmajor-changes/topic/Run.20more.20tests.20for.20rustc_codegen_gcc.20in.20t.E2.80.A6.20compiler-team.23891/with/543701828. r? ``@GuillaumeGomez``
2 parents 956f47c + e755d71 commit 514fdd0

File tree

1 file changed

+11
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+11
-0
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,6 +1942,17 @@ HELP: You can add it into `bootstrap.toml` in `rust.codegen-backends = [{name:?}
19421942
);
19431943
crate::exit!(1);
19441944
}
1945+
1946+
if let CodegenBackendKind::Gcc = codegen_backend
1947+
&& builder.config.rustc_debug_assertions
1948+
{
1949+
eprintln!(
1950+
r#"WARNING: Running tests with the GCC codegen backend while rustc debug assertions are enabled. This might lead to test failures.
1951+
Please disable assertions with `rust.debug-assertions = false`.
1952+
"#
1953+
);
1954+
}
1955+
19451956
// Tells compiletest that we want to use this codegen in particular and to override
19461957
// the default one.
19471958
cmd.arg("--override-codegen-backend").arg(codegen_backend.name());

0 commit comments

Comments
 (0)