| author | |
| committer | |
| log | a91f55239369b4401aaa50a74ed939f5eb98395d |
| tree | 30d671cdd94ecc6d26c57414b21dd70c41af8a89 |
| parent | 6a046c1bcda1d02d4f9a05ea125ef56b50cf6e7c |
| signature | Commit is signed but in an unrecognized format. |
2 files changed, 4 insertions(+), 3 deletions(-)
lib/std/builtin.zig+2-1| ... | ... | @@ -26,7 +26,8 @@ pub const subsystem: ?SubSystem = blk: { |
| 26 | 26 | if (is_test) { |
| 27 | 27 | break :blk SubSystem.Console; |
| 28 | 28 | } |
| 29 | if (@hasDecl(root, "WinMain") or | |
| 29 | if (@hasDecl(root, "main") or | |
| 30 | @hasDecl(root, "WinMain") or | |
| 30 | 31 | @hasDecl(root, "wWinMain") or |
| 31 | 32 | @hasDecl(root, "WinMainCRTStartup") or |
| 32 | 33 | @hasDecl(root, "wWinMainCRTStartup")) |
src/codegen.cpp+2-2| ... | ... | @@ -8229,9 +8229,9 @@ TargetSubsystem detect_subsystem(CodeGen *g) { |
| 8229 | 8229 | if (g->zig_target->os == OsWindows) { |
| 8230 | 8230 | if (g->have_dllmain_crt_startup || (g->out_type == OutTypeLib && g->is_dynamic)) |
| 8231 | 8231 | return TargetSubsystemAuto; |
| 8232 | if (g->have_c_main || g->is_test_build) | |
| 8232 | if (g->have_c_main || g->is_test_build || g->have_winmain_crt_startup) | |
| 8233 | 8233 | return TargetSubsystemConsole; |
| 8234 | if (g->have_winmain || g->have_winmain_crt_startup) | |
| 8234 | if (g->have_winmain) | |
| 8235 | 8235 | return TargetSubsystemWindows; |
| 8236 | 8236 | } else if (g->zig_target->os == OsUefi) { |
| 8237 | 8237 | return TargetSubsystemEfiApplication; |