mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
WinMainCRTStartup implies defaulting to console subsystem
This commit is contained in:
parent
6a046c1bcd
commit
a91f552393
@ -26,7 +26,8 @@ pub const subsystem: ?SubSystem = blk: {
|
||||
if (is_test) {
|
||||
break :blk SubSystem.Console;
|
||||
}
|
||||
if (@hasDecl(root, "WinMain") or
|
||||
if (@hasDecl(root, "main") or
|
||||
@hasDecl(root, "WinMain") or
|
||||
@hasDecl(root, "wWinMain") or
|
||||
@hasDecl(root, "WinMainCRTStartup") or
|
||||
@hasDecl(root, "wWinMainCRTStartup"))
|
||||
|
||||
@ -8229,9 +8229,9 @@ TargetSubsystem detect_subsystem(CodeGen *g) {
|
||||
if (g->zig_target->os == OsWindows) {
|
||||
if (g->have_dllmain_crt_startup || (g->out_type == OutTypeLib && g->is_dynamic))
|
||||
return TargetSubsystemAuto;
|
||||
if (g->have_c_main || g->is_test_build)
|
||||
if (g->have_c_main || g->is_test_build || g->have_winmain_crt_startup)
|
||||
return TargetSubsystemConsole;
|
||||
if (g->have_winmain || g->have_winmain_crt_startup)
|
||||
if (g->have_winmain)
|
||||
return TargetSubsystemWindows;
|
||||
} else if (g->zig_target->os == OsUefi) {
|
||||
return TargetSubsystemEfiApplication;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user