Skip to content

Commit 1514cb6

Browse files
committed
Auto merge of #157488 - jieyouxu:jieyouxu/fix/windows-subsystem-hack, r=<try>
compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows try-job: aarch64-msvc-1 try-job: x86_64-msvc-1
2 parents 39ec825 + f25f4b4 commit 1514cb6

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)