diff --git a/Misc/NEWS.d/next/Build/2026-08-20-14-02-33.gh-issue-156115.KXr8wU.rst b/Misc/NEWS.d/next/Build/2026-08-20-14-02-33.gh-issue-156115.KXr8wU.rst new file mode 100644 index 000000000000000..612180d3b65db21 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2026-08-20-14-02-33.gh-issue-156115.KXr8wU.rst @@ -0,0 +1,4 @@ +iOS simulator builds are now configured with +``-mios-simulator-version-min`` instead of the device's +``-mios-version-min``. The device flag made the linker reject libraries +resolved from the simulator SDK, so library detection silently failed. diff --git a/configure b/configure index ea560d600722592..1b03d29e91a8336 100755 --- a/configure +++ b/configure @@ -4895,8 +4895,13 @@ case $host in #( ;; esac -case $ac_sys_system in #( - iOS) : +case $host in #( + *-apple-ios*-simulator) : + + as_fn_append CFLAGS " -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" + as_fn_append LDFLAGS " -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" + ;; #( + *-apple-ios*) : as_fn_append CFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" as_fn_append LDFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" diff --git a/configure.ac b/configure.ac index 7dfc6ca29297a8b..99444990cf0c741 100644 --- a/configure.ac +++ b/configure.ac @@ -1006,8 +1006,12 @@ AS_CASE([$host], ) dnl Add the compiler flag for the iOS minimum supported OS version. -AS_CASE([$ac_sys_system], - [iOS], [ +AS_CASE([$host], + [*-apple-ios*-simulator], [ + AS_VAR_APPEND([CFLAGS], [" -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"]) + AS_VAR_APPEND([LDFLAGS], [" -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"]) + ], + [*-apple-ios*], [ AS_VAR_APPEND([CFLAGS], [" -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"]) AS_VAR_APPEND([LDFLAGS], [" -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"]) ],