@@ -68,7 +68,7 @@ function(_report_sdk prefix)
68
68
endfunction ()
69
69
70
70
# Remove architectures not supported by the SDK from the given list.
71
- function (remove_sdk_unsupported_archs name os sdk_path architectures_var )
71
+ function (remove_sdk_unsupported_archs name os sdk_path deployment_version architectures_var )
72
72
execute_process (COMMAND
73
73
/usr/libexec/PlistBuddy -c "Print :SupportedTargets:${os} :Archs" ${sdk_path} /SDKSettings.plist
74
74
OUTPUT_VARIABLE sdk_supported_archs
@@ -87,11 +87,11 @@ function(remove_sdk_unsupported_archs name os sdk_path architectures_var)
87
87
# 32-bit iOS simulator is not listed explicitly in SDK settings.
88
88
message (STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch} " )
89
89
list (APPEND architectures ${arch} )
90
- elseif (arch STREQUAL "armv7k" AND os STREQUAL "watchos" )
90
+ elseif (arch STREQUAL "armv7k" AND os STREQUAL "watchos" AND deployment_version VERSION_LESS "9.0" )
91
91
# 32-bit watchOS is not listed explicitly in SDK settings.
92
92
message (STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch} " )
93
93
list (APPEND architectures ${arch} )
94
- elseif (arch STREQUAL "i386" AND os STREQUAL "watchsimulator" )
94
+ elseif (arch STREQUAL "i386" AND os STREQUAL "watchsimulator" AND deployment_version VERSION_LESS "7.0" )
95
95
# 32-bit watchOS simulator is not listed explicitly in SDK settings.
96
96
message (STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch} " )
97
97
list (APPEND architectures ${arch} )
@@ -229,7 +229,7 @@ macro(configure_sdk_darwin
229
229
endif ()
230
230
231
231
# Remove any architectures not supported by the SDK.
232
- remove_sdk_unsupported_archs (${name} ${xcrun_name} ${SWIFT_SDK_${prefix}_PATH} SWIFT_SDK_${prefix}_ARCHITECTURES )
232
+ remove_sdk_unsupported_archs (${name} ${xcrun_name} ${SWIFT_SDK_${prefix}_PATH} "${SWIFT_SDK_ ${prefix} _DEPLOYMENT_VERSION}" SWIFT_SDK_${prefix}_ARCHITECTURES )
233
233
234
234
list_intersect (
235
235
"${SWIFT_DARWIN_MODULE_ARCHS} " # lhs
0 commit comments