mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-28 05:44:57 +00:00
Made sure the entry point is not generated when -no-entry-point is specified.
This commit is contained in:
@@ -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;
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user