aboutsummaryrefslogtreecommitdiff
path: root/src/linker.cpp
diff options
context:
space:
mode:
authorHarold Brenes <harold@hbrenes.com>2025-07-14 14:24:15 -0400
committerHarold Brenes <harold@hbrenes.com>2025-07-14 14:28:07 -0400
commit77e5c7141448219a6a0fc40f281951c4e8a5c0eb (patch)
tree7258c9271e70d6224adaffed79584056ebaa5428 /src/linker.cpp
parent02e5dc9948cfa4e0b96219d63bfd10c91591ec88 (diff)
Fix correct versioned target triplet for iphonesimulator subtarget
- Always set the `-m*-version-min` linker flag for non-macOS Darwin subtargets
Diffstat (limited to 'src/linker.cpp')
-rw-r--r--src/linker.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/linker.cpp b/src/linker.cpp
index 413995e0d..7647ed872 100644
--- a/src/linker.cpp
+++ b/src/linker.cpp
@@ -846,7 +846,9 @@ try_cross_linking:;
// 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) {
+ // NOTE(harold): For device subtargets we have to explicitly set the default version to
+ // avoid the same warning since we configure our own minimum version when compiling for devices.
+ if (build_context.minimum_os_version_string_given || selected_subtarget != Subtarget_Default) {
link_settings = gb_string_append_fmt(link_settings, "-m%s-version-min=%.*s ", darwin_min_version_id, LIT(build_context.minimum_os_version_string));
}