Skip to content

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

Open
jieyouxu wants to merge 1 commit into
rust-lang:mainfrom
jieyouxu:jieyouxu/fix/windows-subsystem-hack
Open

compiletest: inject #![windows_subsystem = "windows"] to debuginfo tests on Windows#157488
jieyouxu wants to merge 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)
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