mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
set subsystem to null if not on windows or uefi
This commit is contained in:
parent
6bc5b07e3e
commit
b461e600e2
@ -7919,13 +7919,13 @@ Buf *codegen_generate_builtin_source(CodeGen *g) {
|
||||
"EfiRuntimeDriver",
|
||||
};
|
||||
|
||||
if (g->subsystem == TargetSubsystemAuto) {
|
||||
if (g->zig_target->os != OsWindows || g->zig_target->os != OsUefi || g->have_dllmain_crt_startup || g->out_type == OutTypeLib) {
|
||||
buf_appendf(contents, "pub const subsystem = null;\n");
|
||||
} else if (g->subsystem == TargetSubsystemAuto) {
|
||||
if (g->have_c_main || g->have_pub_main) {
|
||||
buf_appendf(contents, "pub const subsystem = SubSystem.%s;\n", subsystem_strings[TargetSubsystemConsole - 1]);
|
||||
} else if (g->have_winmain || g->have_winmain_crt_startup) {
|
||||
buf_appendf(contents, "pub const subsystem = SubSystem.%s;\n", subsystem_strings[TargetSubsystemWindows - 1]);
|
||||
} else if (g->have_dllmain_crt_startup || g->out_type == OutTypeLib) {
|
||||
buf_appendf(contents, "pub const subsystem = null;\n");
|
||||
}
|
||||
} else {
|
||||
buf_appendf(contents, "pub const subsystem = SubSystem.%s;\n", subsystem_strings[g->subsystem - 1]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user