darwin: fix linker warning when building dynamic library

Trying to fix all linker warnings that macOS comes up with, when
building a dynamic library it currently emits `ld: warning: ignoring -e, not used for output type`
This commit is contained in:
Laytan Laats
2024-03-25 22:06:44 +01:00
parent 63d6b4752b
commit 19d566ebc5
+4 -2
View File
@@ -508,8 +508,10 @@ gb_internal i32 linker_stage(LinkerData *gen) {
link_settings = gb_string_append_fmt(link_settings, "-mmacosx-version-min=%.*s ", LIT(build_context.minimum_os_version_string));
}
// This points the linker to where the entry point is
link_settings = gb_string_appendc(link_settings, "-e _main ");
if (build_context.build_mode != BuildMode_DynamicLibrary) {
// This points the linker to where the entry point is
link_settings = gb_string_appendc(link_settings, "-e _main ");
}
}
if (!build_context.no_crt) {