Fix correct versioned target triplet for iphonesimulator subtarget

- Always set the `-m*-version-min` linker flag for non-macOS Darwin subtargets
This commit is contained in:
Harold Brenes
2025-07-14 14:24:15 -04:00
parent 02e5dc9948
commit 77e5c71414
2 changed files with 13 additions and 2 deletions

View File

@@ -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));
}