diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2020-11-10 17:47:02 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-10 17:47:02 +0000 |
| commit | 27d066054605ac96c8ae7236aee2021342492046 (patch) | |
| tree | d5adf70488aeb6686dd9d872d11dd6a750462322 /src/ir.cpp | |
| parent | 49e140f4db1f9fffa541c4d58efa91b7128c4ff4 (diff) | |
| parent | 0eba4b46b5e554f1df01b63084ac4e78abfe3117 (diff) | |
Merge pull request #779 from F0x1fy/master
Add flag -no-entry-point
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 2b3bd35df..dc77906e8 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -12646,7 +12646,7 @@ void ir_gen_tree(irGen *s) { #if defined(GB_SYSTEM_WINDOWS) - if (build_context.build_mode == BuildMode_DynamicLibrary && !has_dll_main) { + if (build_context.build_mode == BuildMode_DynamicLibrary && !has_dll_main && !build_context.no_entry_point) { // DllMain :: proc(inst: rawptr, reason: u32, reserved: rawptr) -> i32 String name = str_lit("DllMain"); Type *proc_params = alloc_type_tuple(); @@ -12717,7 +12717,7 @@ void ir_gen_tree(irGen *s) { ir_emit_return(proc, v_one32); } #endif - if (!(build_context.build_mode == BuildMode_DynamicLibrary && !has_dll_main)) { + if (!(build_context.build_mode == BuildMode_DynamicLibrary && !has_dll_main) && !build_context.no_entry_point) { // main :: proc(argc: i32, argv: ^^u8) -> i32 String name = str_lit("main"); @@ -12796,7 +12796,7 @@ void ir_gen_tree(irGen *s) { } #if defined(GB_SYSTEM_WINDOWS) - if (build_context.build_mode != BuildMode_DynamicLibrary && build_context.no_crt) { + if (build_context.build_mode != BuildMode_DynamicLibrary && build_context.no_crt && !build_context.no_entry_point) { s->print_chkstk = true; { |