mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
Made sure the entry point is not generated when -no-entry-point is specified.
This commit is contained in:
+3
-3
@@ -12646,7 +12646,7 @@ void ir_gen_tree(irGen *s) {
|
|||||||
|
|
||||||
|
|
||||||
#if defined(GB_SYSTEM_WINDOWS)
|
#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
|
// DllMain :: proc(inst: rawptr, reason: u32, reserved: rawptr) -> i32
|
||||||
String name = str_lit("DllMain");
|
String name = str_lit("DllMain");
|
||||||
Type *proc_params = alloc_type_tuple();
|
Type *proc_params = alloc_type_tuple();
|
||||||
@@ -12717,7 +12717,7 @@ void ir_gen_tree(irGen *s) {
|
|||||||
ir_emit_return(proc, v_one32);
|
ir_emit_return(proc, v_one32);
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
// main :: proc(argc: i32, argv: ^^u8) -> i32
|
||||||
String name = str_lit("main");
|
String name = str_lit("main");
|
||||||
|
|
||||||
@@ -12796,7 +12796,7 @@ void ir_gen_tree(irGen *s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(GB_SYSTEM_WINDOWS)
|
#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;
|
s->print_chkstk = true;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user