aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp4
1 files changed, 4 insertions, 0 deletions
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;
}
}