diff options
| author | gingerBill <bill@gingerbill.org> | 2020-04-13 12:00:40 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-04-13 12:00:40 +0100 |
| commit | 65a2125dba5652577588afee31d7333f13eb0c31 (patch) | |
| tree | 2b7da4905dd3ce06c79f50079d20200ba5b4aba9 /src/ir.cpp | |
| parent | 9e698b720f4f26341db81b70ea5f70f5bdfd9e3a (diff) | |
Add `-build-mode=obj`
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index c01876b5d..2cc7270cb 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -12137,7 +12137,7 @@ void ir_gen_tree(irGen *s) { #if defined(GB_SYSTEM_WINDOWS) - if (build_context.is_dll && !has_dll_main) { + if (build_context.build_mode == BuildMode_DynamicLibrary && !has_dll_main) { // DllMain :: proc(inst: rawptr, reason: u32, reserved: rawptr) -> i32 String name = str_lit("DllMain"); Type *proc_params = alloc_type_tuple(); @@ -12208,7 +12208,7 @@ void ir_gen_tree(irGen *s) { ir_emit_return(proc, v_one32); } #endif - if (!(build_context.is_dll && !has_dll_main)) { + if (!(build_context.build_mode == BuildMode_DynamicLibrary && !has_dll_main)) { // main :: proc(argc: i32, argv: ^^u8) -> i32 String name = str_lit("main"); @@ -12287,7 +12287,7 @@ void ir_gen_tree(irGen *s) { } #if defined(GB_SYSTEM_WINDOWS) - // if (!m->build_context->is_dll && !has_win_main) { + // if (m->build_context->build_mode != BuildMode_DynamicLibrary && !has_win_main) { // // proc WinMain(inst, prev: rawptr, cmd_line: ^byte, cmd_show: i32) -> i32 // String name = str_lit("WinMain"); // Type *proc_params = alloc_type_tuple(); @@ -12331,7 +12331,7 @@ void ir_gen_tree(irGen *s) { // ir_emit_return(proc, v_one32); // ir_end_procedure_body(proc); // } - if (!build_context.is_dll && build_context.no_crt) { + if (build_context.build_mode != BuildMode_DynamicLibrary && build_context.no_crt) { s->print_chkstk = true; { |