Skip to content

compiletest: inject #![windows_subsystem = "windows"] to debuginfo tests on Windows#157488

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
jieyouxu:jieyouxu/fix/windows-subsystem-hack
Jun 7, 2026
Merged

compiletest: inject #![windows_subsystem = "windows"] to debuginfo tests on Windows#157488
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
jieyouxu:jieyouxu/fix/windows-subsystem-hack

Conversation

@jieyouxu
Copy link
Copy Markdown
Member

@jieyouxu jieyouxu commented Jun 5, 2026

So that we don't get a bunch of console windows spawned by the debuggees.

r? @Kobzol (or bootstrap/compiler)

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jun 5, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jun 5, 2026

Kobzol is not on the review rotation at the moment.
They may take a while to respond.

@jieyouxu jieyouxu marked this pull request as ready for review June 5, 2026 15:25
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 5, 2026
@jieyouxu
Copy link
Copy Markdown
Member Author

jieyouxu commented Jun 5, 2026

I tested this locally on MSVC and MINGW64, seems to Work On My Machine ™️. Thanks @Walnut356 for the tip!

Without this, trying to run debuginfo tests w/ lldb (or gdb etc.) on MINGW / MSVC spawns a bunch of stacked windows.

Maybe there's a better way but I'm not finding one yet.

@Kobzol
Copy link
Copy Markdown
Member

Kobzol commented Jun 5, 2026

I think that this approach is reasonable, and not even so hacky, as far as bootstrap/compiletest hacks usually go. Shouldn't it be only done on Windows though? Seems like now it is applied on all OSes.

@jieyouxu
Copy link
Copy Markdown
Member Author

jieyouxu commented Jun 5, 2026

I think that this approach is reasonable, and not even so hacky, as far as bootstrap/compiletest hacks usually go. Shouldn't it be only done on Windows though? Seems like now it is applied on all OSes.

D'oh I meant to gate it behind windows but then forgor

…tests on Windows

So that we don't get a bunch of console windows spawned by the debugger
processes.
@jieyouxu jieyouxu force-pushed the jieyouxu/fix/windows-subsystem-hack branch from eb0d8d4 to f25f4b4 Compare June 5, 2026 15:53
@jieyouxu
Copy link
Copy Markdown
Member Author

jieyouxu commented Jun 5, 2026

Just in case:
@bors try jobs=aarch64-msvc-1,x86_64-msvc-1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 5, 2026
… r=<try>

compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows


try-job: aarch64-msvc-1
try-job: x86_64-msvc-1
@jieyouxu
Copy link
Copy Markdown
Member Author

jieyouxu commented Jun 5, 2026

Pushed an update to gate the attr insertion on... Windows host only (d'oh).

@jieyouxu
Copy link
Copy Markdown
Member Author

jieyouxu commented Jun 5, 2026

NB: Fulgen kindly suggested that we can use CommandExt::creation_flags (https://doc.rust-lang.org/std/os/windows/process/trait.CommandExt.html#tymethod.creation_flags) w/ CREATE_NO_WINDOW. I should check if we can use that instead of -Zcrate-attr.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 5, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 5, 2026

☀️ Try build successful (CI)
Build commit: 1514cb6 (1514cb62ddcaae1ed8132e53d8754b0b8c38fc6b, parent: 39ec825c441918a4ae623a9b8840d1ccd446dcff)

@jieyouxu
Copy link
Copy Markdown
Member Author

jieyouxu commented Jun 5, 2026

Actually I thought about this: I think we can go with the -Zcrate-attr approach first, I'll look into the CommandExt approach in parallel. I rather not have all the annoying windows pop-up any time longer than necessary.

@rustbot review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 5, 2026
@Kobzol
Copy link
Copy Markdown
Member

Kobzol commented Jun 5, 2026

Thanks!

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 5, 2026

📌 Commit f25f4b4 has been approved by Kobzol

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 5, 2026
ShoyuVanilla added a commit to ShoyuVanilla/rust that referenced this pull request Jun 6, 2026
…ystem-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)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 6, 2026
…ystem-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)
rust-bors Bot pushed a commit that referenced this pull request Jun 6, 2026
Rollup of 5 pull requests

Successful merges:

 - #157016 (add `extern "tail"` calling convention)
 - #157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - #157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - #156136 (Move tests box)
 - #157494 (Convert `QueryRegionConstraint` into a struct)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 6, 2026
…ystem-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)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 6, 2026
…ystem-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)
rust-bors Bot pushed a commit that referenced this pull request Jun 6, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #157016 (add `extern "tail"` calling convention)
 - #157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - #157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - #157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - #157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - #156136 (Move tests box)
 - #157289 (Add infallible primitive type lookups to template arg resolver)
 - #157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - #157494 (Convert `QueryRegionConstraint` into a struct)
 - #157526 (std tests: skip a slow test on Miri)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 6, 2026
…ystem-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)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 6, 2026
…ystem-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)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 6, 2026
…ystem-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)
rust-bors Bot pushed a commit that referenced this pull request Jun 6, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #157251 (`rust-analyzer` subtree update)
 - #157533 (Subtree sync for rustc_codegen_cranelift)
 - #154742 (Add APIs for case folding to the standard library)
 - #155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - #157016 (add `extern "tail"` calling convention)
 - #157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - #157386 (Parse deprecated note links separately in rustc_resolve)
 - #157483 (fix windows-gnu TLS leak)
 - #157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - #157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - #157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - #156136 (Move tests box)
 - #157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - #157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - #157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - #157494 (Convert `QueryRegionConstraint` into a struct)
 - #157526 (std tests: skip a slow test on Miri)

Failed merges:

 - #155527 (Replace printables table with `unicode_data.rs` tables)
rust-bors Bot pushed a commit that referenced this pull request Jun 6, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #157251 (`rust-analyzer` subtree update)
 - #157533 (Subtree sync for rustc_codegen_cranelift)
 - #154742 (Add APIs for case folding to the standard library)
 - #155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - #157016 (add `extern "tail"` calling convention)
 - #157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - #157386 (Parse deprecated note links separately in rustc_resolve)
 - #157483 (fix windows-gnu TLS leak)
 - #157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - #157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - #157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - #156136 (Move tests box)
 - #157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - #157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - #157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - #157494 (Convert `QueryRegionConstraint` into a struct)
 - #157526 (std tests: skip a slow test on Miri)

Failed merges:

 - #155527 (Replace printables table with `unicode_data.rs` tables)
rust-bors Bot pushed a commit that referenced this pull request Jun 6, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #157251 (`rust-analyzer` subtree update)
 - #157533 (Subtree sync for rustc_codegen_cranelift)
 - #154742 (Add APIs for case folding to the standard library)
 - #155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - #157016 (add `extern "tail"` calling convention)
 - #157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - #157386 (Parse deprecated note links separately in rustc_resolve)
 - #157483 (fix windows-gnu TLS leak)
 - #157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - #157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - #157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - #156136 (Move tests box)
 - #157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - #157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - #157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - #157494 (Convert `QueryRegionConstraint` into a struct)
 - #157526 (std tests: skip a slow test on Miri)

Failed merges:

 - #155527 (Replace printables table with `unicode_data.rs` tables)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 7, 2026
…ystem-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)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 7, 2026
…ystem-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)
rust-bors Bot pushed a commit that referenced this pull request Jun 7, 2026
Rollup of 25 pull requests

Successful merges:

 - #157251 (`rust-analyzer` subtree update)
 - #157533 (Subtree sync for rustc_codegen_cranelift)
 - #154742 (Add APIs for case folding to the standard library)
 - #155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - #156222 (Stabilize `Result::map_or_default` and `Option::map_or_default`)
 - #157016 (add `extern "tail"` calling convention)
 - #157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - #157386 (Parse deprecated note links separately in rustc_resolve)
 - #157483 (fix windows-gnu TLS leak)
 - #157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - #157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - #157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - #156136 (Move tests box)
 - #156573 (Add unwinder_private_data_size for wasm64 target)
 - #156783 (docs: make `Rc::into_raw` clickable in `Rc::increment_strong_count` doc)
 - #156840 (Stabilize `PathBuf::into_string`)
 - #156936 (Remove FIXME about impl PinCoerceUnsized for UnsafePinned<T>)
 - #157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - #157380 (clarify compiler_fence (and fence) docs)
 - #157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - #157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - #157494 (Convert `QueryRegionConstraint` into a struct)
 - #157526 (std tests: skip a slow test on Miri)
 - #157531 (ci: bump x86_64-gnu base image to 26.04)
 - #157556 (Add `BTree::append()` change to 1.96.0 relnotes)

Failed merges:

 - #155527 (Replace printables table with `unicode_data.rs` tables)
@rust-bors rust-bors Bot merged commit 48c69a9 into rust-lang:main Jun 7, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 7, 2026
rust-timer added a commit that referenced this pull request Jun 7, 2026
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)
@jieyouxu jieyouxu deleted the jieyouxu/fix/windows-subsystem-hack branch June 7, 2026 10:22
pull Bot pushed a commit to asukaminato0721/rust-analyzer that referenced this pull request Jun 7, 2026
Rollup of 25 pull requests

Successful merges:

 - rust-lang/rust#157251 (`rust-analyzer` subtree update)
 - rust-lang/rust#157533 (Subtree sync for rustc_codegen_cranelift)
 - rust-lang/rust#154742 (Add APIs for case folding to the standard library)
 - rust-lang/rust#155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - rust-lang/rust#156222 (Stabilize `Result::map_or_default` and `Option::map_or_default`)
 - rust-lang/rust#157016 (add `extern "tail"` calling convention)
 - rust-lang/rust#157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - rust-lang/rust#157386 (Parse deprecated note links separately in rustc_resolve)
 - rust-lang/rust#157483 (fix windows-gnu TLS leak)
 - rust-lang/rust#157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - rust-lang/rust#157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - rust-lang/rust#157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - rust-lang/rust#156136 (Move tests box)
 - rust-lang/rust#156573 (Add unwinder_private_data_size for wasm64 target)
 - rust-lang/rust#156783 (docs: make `Rc::into_raw` clickable in `Rc::increment_strong_count` doc)
 - rust-lang/rust#156840 (Stabilize `PathBuf::into_string`)
 - rust-lang/rust#156936 (Remove FIXME about impl PinCoerceUnsized for UnsafePinned<T>)
 - rust-lang/rust#157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - rust-lang/rust#157380 (clarify compiler_fence (and fence) docs)
 - rust-lang/rust#157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - rust-lang/rust#157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - rust-lang/rust#157494 (Convert `QueryRegionConstraint` into a struct)
 - rust-lang/rust#157526 (std tests: skip a slow test on Miri)
 - rust-lang/rust#157531 (ci: bump x86_64-gnu base image to 26.04)
 - rust-lang/rust#157556 (Add `BTree::append()` change to 1.96.0 relnotes)

Failed merges:

 - rust-lang/rust#155527 (Replace printables table with `unicode_data.rs` tables)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants