From 41b588547cd49673ff632ed0fc3210c76ff48b42 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 23 Sep 2017 18:46:03 -0400 Subject: improvements to windows support See #302 --- src/analyze.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/analyze.cpp') diff --git a/src/analyze.cpp b/src/analyze.cpp index e0d34be281..b20b7b3bd7 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -3189,6 +3189,8 @@ ImportTableEntry *add_source_file(CodeGen *g, PackageTableEntry *package, Buf *a if (is_pub) { if (buf_eql_str(proto_name, "main")) { g->have_pub_main = true; + g->windows_subsystem_windows = false; + g->windows_subsystem_console = true; } else if (buf_eql_str(proto_name, "panic")) { g->have_pub_panic = true; } @@ -3196,6 +3198,8 @@ ImportTableEntry *add_source_file(CodeGen *g, PackageTableEntry *package, Buf *a g->libc_link_lib != nullptr) { g->have_c_main = true; + g->windows_subsystem_windows = false; + g->windows_subsystem_console = true; } } -- cgit v1.2.3