diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2024-03-26 11:16:25 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-26 11:16:25 +0000 |
| commit | 2165303f5ee8deca3e473e4e44c23265e2f1649a (patch) | |
| tree | 56bf35c2fc7c020296eaa8bf1aa6375cc5d0c168 /src/linker.cpp | |
| parent | c59f6d548b16fdbae09986ff7be8e86877c30243 (diff) | |
| parent | b26a685b769c99128f96a4b00c578775daec5192 (diff) | |
Merge pull request #3332 from laytan/darwin-be-less-annoying-about-library-versions
darwin: be less annoying about "incompatible" library versions
Diffstat (limited to 'src/linker.cpp')
| -rw-r--r-- | src/linker.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/linker.cpp b/src/linker.cpp index 6699c9cb8..63987f9e8 100644 --- a/src/linker.cpp +++ b/src/linker.cpp @@ -502,9 +502,12 @@ gb_internal i32 linker_stage(LinkerData *gen) { platform_lib_str = gb_string_appendc(platform_lib_str, "-L/opt/local/lib "); } - if (build_context.minimum_os_version_string.len) { + // Only specify this flag if the user has given a minimum version to target. + // This will cause warnings to show up for mismatched libraries. + if (build_context.minimum_os_version_string_given) { 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 "); } |