Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,24 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
}

let mut flags = if is_rustdoc { Vec::new() } else { vec!["-Crpath".to_string()] };
flags.push(format!("-Cdebuginfo={}", builder.config.rust_debuginfo_level_tests));
flags.push(format!(
"-Cdebuginfo={}",
if suite == "codegen" {
// codegen tests typically check LLVM IR and are sensitive to additional debuginfo.
// So do not apply `rust.debuginfo-level-tests` for codegen tests.
if builder.config.rust_debuginfo_level_tests
!= crate::core::config::DebuginfoLevel::None
{
println!(
"NOTE: ignoring `rust.debuginfo-level-tests={}` for codegen tests",
builder.config.rust_debuginfo_level_tests
);
}
crate::core::config::DebuginfoLevel::None
} else {
builder.config.rust_debuginfo_level_tests
}
));
flags.extend(builder.config.cmd.compiletest_rustc_args().iter().map(|s| s.to_string()));

if suite != "mir-opt" {
Expand Down
Loading