Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extends windows subsystem support (or just relax limitation) #37553

Closed
liigo opened this issue Nov 3, 2016 · 5 comments
Closed

extends windows subsystem support (or just relax limitation) #37553

liigo opened this issue Nov 3, 2016 · 5 comments

Comments

@liigo
Copy link
Contributor

liigo commented Nov 3, 2016

For attribute #![windows_subsystem = "VALUE"], the current implementation only accept Windows and Console as VALUE, which has unnecessary limitation.

Perhaps we should make it possible to use #![windows_subsystem = "Console,5.01"] or something similar. The version '5.01' here is necessary to create valid .exe to Windows XP, at least for VC 2015 linker on Windows 10.

cc PR #37501, ISSUE #34407 @alexcrichton


Update: Other available subsystems may be supported: NATIVE, POSIX, BOOT_APPLICATION, ...

/SUBSYSTEM:{BOOT_APPLICATION|CONSOLE|EFI_APPLICATION|  
            EFI_BOOT_SERVICE_DRIVER|EFI_ROM|EFI_RUNTIME_DRIVER|NATIVE|  
            POSIX|WINDOWS)  
            [,major[.minor]]  

More details at https://msdn.microsoft.com/en-us/library/fcc1zstk.aspx

@liigo
Copy link
Contributor Author

liigo commented Nov 3, 2016

cc #37499

@liigo liigo changed the title allow specifying the version of windows subsystem extends windows subsystem support (or just relax limitation) Nov 10, 2016
@lygstate
Copy link
Contributor

We could make sure ,5.01 always append to the linker, that's doesn't affect the link result much.

@mattico
Copy link
Contributor

mattico commented Mar 28, 2017

Using an attribute like #[windows_subsystem(type = "console")] would make this more easily extensible, no? #[windows_subsystem(type = "console", version = "5.01")]

@pravic
Copy link
Contributor

pravic commented May 14, 2017

Also it is a bit confusing now that empty #![windows_subsystem] gives no warnings or something: https://is.gd/8MpSo5

Because its own name is not so clear and looks like self-sufficient to assign the windows subsystem to the executable.

Posting here because #37499 was closed.

@Mark-Simulacrum
Copy link
Member

Closing. If someone wants to pursue this, please follow the RFC process here https://github.com/rust-lang/rfcs#before-creating-an-rfc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants