diff options
| author | gingerBill <bill@gingerbill.org> | 2024-03-26 13:06:46 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-03-26 13:06:46 +0000 |
| commit | 620dd2c8125164c912a1f246f07878ffa141e50b (patch) | |
| tree | 3d73b646fd4a1192bb0aba4551e71a3ddfa35b22 /src/linker.cpp | |
| parent | 533ba63c82d21dbd21551970200ebc5b81d237f1 (diff) | |
| parent | 2165303f5ee8deca3e473e4e44c23265e2f1649a (diff) | |
Merge branch 'master' of https://github.com/odin-lang/Odin
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 "); } |