From 77e5c7141448219a6a0fc40f281951c4e8a5c0eb Mon Sep 17 00:00:00 2001 From: Harold Brenes Date: Mon, 14 Jul 2025 14:24:15 -0400 Subject: Fix correct versioned target triplet for iphonesimulator subtarget - Always set the `-m*-version-min` linker flag for non-macOS Darwin subtargets --- src/linker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/linker.cpp') 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)); } -- cgit v1.2.3