Skip to content

Commit 48c69a9

Browse files
authored
Rollup merge of #157488 - jieyouxu:jieyouxu/fix/windows-subsystem-hack, r=Kobzol
compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows So that we don't get a bunch of console windows spawned by the debuggees. r? @Kobzol (or bootstrap/compiler)
2 parents 4733345 + f25f4b4 commit 48c69a9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/tools/compiletest/src/runtest.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,6 +1645,11 @@ impl<'test> TestCx<'test> {
16451645
if self.config.mode == TestMode::CodegenUnits {
16461646
compiler.args(&["-Z", "human_readable_cgu_names"]);
16471647
}
1648+
1649+
if self.config.mode == TestMode::DebugInfo && cfg!(target_os = "windows") {
1650+
// Prevent debugger processes from creating new console windows.
1651+
compiler.args(&["-Z", r#"crate-attr=windows_subsystem="windows""#]);
1652+
}
16481653
}
16491654

16501655
if self.config.optimize_tests && compiler_kind == CompilerKind::Rustc {

0 commit comments

Comments
 (0)