Add a warning when running tests with the GCC backend and debug assertions are enabled
This commit is contained in:
parent
36e4f5d1fe
commit
e755d71855
1 changed files with 11 additions and 0 deletions
|
|
@ -1942,6 +1942,17 @@ HELP: You can add it into `bootstrap.toml` in `rust.codegen-backends = [{name:?}
|
|||
);
|
||||
crate::exit!(1);
|
||||
}
|
||||
|
||||
if let CodegenBackendKind::Gcc = codegen_backend
|
||||
&& builder.config.rustc_debug_assertions
|
||||
{
|
||||
eprintln!(
|
||||
r#"WARNING: Running tests with the GCC codegen backend while rustc debug assertions are enabled. This might lead to test failures.
|
||||
Please disable assertions with `rust.debug-assertions = false`.
|
||||
"#
|
||||
);
|
||||
}
|
||||
|
||||
// Tells compiletest that we want to use this codegen in particular and to override
|
||||
// the default one.
|
||||
cmd.arg("--override-codegen-backend").arg(codegen_backend.name());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue