Repository navigation
Link a windowed Windows program from a subsystem line in ens.package - #340
Merged
Merged
Conversation
…ixes #338 Co-authored-by: DicyAgent <354226518+DicyAgent@users.noreply.github.com>
Collaborator
Author
|
Pushed 80c1796. |
DicyAgent
marked this pull request as ready for review
November 30, 2026 11:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #338
A package can now set the subsystem of a Windows program in
ens.package:subsystem "windows";links the program for the windows subsystem, so it starts with no console window.subsystem "console";is the default and what a manifest with no line gets.mainCRTStartupon both COFF link paths when the program is windowed, which fixes theundefined symbol: WinMainfailure for a package that names a library the build does not carry.Verified:
ens build --target x86_64-pc-windows-msvc: the windowed program has PESubsystem = 2, the default program hasSubsystem = 3.xmake teston Linux:selfhost_frontend,selfhost_sema,selfhost_link,selfhost_build,selfhost_syntaxgen,selfhost_driver,semacheck,corpus_roundtrip,ens_lsppass.Not verified here:
printoutput). The issue's measurements stand.user32: this host has no Windows SDK, so only the argument line is pinned, inargv_test.Left open, as the issue says: whether the runtime or the program re-attaches the standard output when a console opens later.