WinMainCRTStartup implies defaulting to console subsystem

This commit is contained in:
Andrew Kelley
2019-12-03 12:52:28 -05:00
parent 6a046c1bcd
commit a91f552393
2 changed files with 4 additions and 3 deletions

View File

@@ -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;