Add wWinMain and wWinMainCRTStartup to fix #4376

This commit is contained in:
Jared Miller
2020-02-07 16:04:50 -05:00
committed by Andrew Kelley
parent 0e7461d4a3
commit b55bc5eb26
5 changed files with 13 additions and 3 deletions

View File

@@ -8340,9 +8340,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 || g->have_winmain_crt_startup)
if (g->have_c_main || g->is_test_build || g->have_winmain_crt_startup || g->have_wwinmain_crt_startup)
return TargetSubsystemConsole;
if (g->have_winmain)
if (g->have_winmain || g->have_wwinmain)
return TargetSubsystemWindows;
} else if (g->zig_target->os == OsUefi) {
return TargetSubsystemEfiApplication;