mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-17 19:32:23 -07:00
darwin: fix ld warnings and set minimum os version
This commit is contained in:
+3
-2
@@ -502,7 +502,6 @@ gb_internal i32 linker_stage(LinkerData *gen) {
|
||||
platform_lib_str = gb_string_appendc(platform_lib_str, "-L/opt/local/lib ");
|
||||
}
|
||||
|
||||
// This sets a requirement of Mountain Lion and up, but the compiler doesn't work without this limit.
|
||||
if (build_context.minimum_os_version_string.len) {
|
||||
link_settings = gb_string_append_fmt(link_settings, "-mmacosx-version-min=%.*s ", LIT(build_context.minimum_os_version_string));
|
||||
}
|
||||
@@ -513,7 +512,9 @@ gb_internal i32 linker_stage(LinkerData *gen) {
|
||||
if (!build_context.no_crt) {
|
||||
platform_lib_str = gb_string_appendc(platform_lib_str, "-lm ");
|
||||
if (build_context.metrics.os == TargetOs_darwin) {
|
||||
platform_lib_str = gb_string_appendc(platform_lib_str, "-lSystem ");
|
||||
// NOTE: adding this causes a warning about duplicate libraries, I think it is
|
||||
// automatically assumed/added by clang when you don't do `-nostdlib`.
|
||||
// platform_lib_str = gb_string_appendc(platform_lib_str, "-lSystem ");
|
||||
} else {
|
||||
platform_lib_str = gb_string_appendc(platform_lib_str, "-lc ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user