diff options
| author | nebulaeonline <linux@nebulae.online> | 2018-12-23 22:21:32 -0500 |
|---|---|---|
| committer | nebulaeonline <linux@nebulae.online> | 2018-12-23 22:21:32 -0500 |
| commit | 39d32ee40a53deb99a3683fed4574adceca95afe (patch) | |
| tree | 188727bf439ab172dd0428ba64368ff2235c96c5 /src/analyze.cpp | |
| parent | 280187031a68c577e84c72add037271153d27c62 (diff) | |
| download | zig-39d32ee40a53deb99a3683fed4574adceca95afe.tar.gz zig-39d32ee40a53deb99a3683fed4574adceca95afe.zip | |
Altered SUBSYSTEM option handling when linking in msvc mode; Added preliminary UEFI support.
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 9c24f3cc8d..48d473fb37 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -3203,24 +3203,25 @@ void add_fn_export(CodeGen *g, ZigFn *fn_table_entry, Buf *symbol_name, GlobalLi if (ccc) { if (buf_eql_str(symbol_name, "main") && g->libc_link_lib != nullptr) { g->have_c_main = true; - g->windows_subsystem_windows = false; - g->windows_subsystem_console = true; + g->msvc_subsystem = ZigLLVM_MSVC_CONSOLE; } else if (buf_eql_str(symbol_name, "WinMain") && g->zig_target.os == OsWindows) { g->have_winmain = true; - g->windows_subsystem_windows = true; - g->windows_subsystem_console = false; + g->msvc_subsystem = ZigLLVM_MSVC_WINDOWS; } else if (buf_eql_str(symbol_name, "WinMainCRTStartup") && g->zig_target.os == OsWindows) { g->have_winmain_crt_startup = true; + g->msvc_subsystem = ZigLLVM_MSVC_WINDOWS; } else if (buf_eql_str(symbol_name, "DllMainCRTStartup") && g->zig_target.os == OsWindows) { g->have_dllmain_crt_startup = true; + g->msvc_subsystem = ZigLLVM_MSVC_WINDOWS; } } + FnExport *fn_export = fn_table_entry->export_list.add_one(); memset(fn_export, 0, sizeof(FnExport)); buf_init_from_buf(&fn_export->name, symbol_name); @@ -4376,8 +4377,7 @@ ImportTableEntry *add_source_file(CodeGen *g, PackageTableEntry *package, Buf *r if (is_pub && ok_cc) { if (buf_eql_str(proto_name, "main")) { g->have_pub_main = true; - g->windows_subsystem_windows = false; - g->windows_subsystem_console = true; + g->msvc_subsystem = ZigLLVM_MSVC_CONSOLE; } else if (buf_eql_str(proto_name, "panic")) { g->have_pub_panic = true; } |
