aboutsummaryrefslogtreecommitdiff
path: root/src/linker.cpp
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-03-23 22:12:05 +0100
committerLaytan Laats <laytanlaats@hotmail.com>2024-03-23 22:12:05 +0100
commit15c1e8274dc19735ca9857962424846148596d26 (patch)
treed7ed2d3c8db493ef73740904b3d8c7ad2824c3ae /src/linker.cpp
parent7d6e9ef39cc46e957a5f8c67c01eb5f5b232597e (diff)
darwin: fix ld warnings and set minimum os version
Diffstat (limited to 'src/linker.cpp')
-rw-r--r--src/linker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/linker.cpp b/src/linker.cpp
index 9d7f16f1d..6699c9cb8 100644
--- a/src/linker.cpp
+++ b/src/linker.cpp
@@ -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 ");
}