Skip to content

Commit 76529b3

Browse files
committed
[watchos] Stop building watchos-armv7k and watchsimulator-i386
When the deployment target is above 9.0 (7.0 for simulator), only building the module content such as the swiftinterface is supported. (cherry picked from commit ae3e4a1) (cherry picked from commit 3c2e58e)
1 parent 241b55e commit 76529b3

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

cmake/modules/DarwinSDKs.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ set(SUPPORTED_OSX_ARCHS "x86_64;arm64")
1818
set(SUPPORTED_XROS_ARCHS "arm64;arm64e")
1919
set(SUPPORTED_XROS_SIMULATOR_ARCHS "arm64")
2020

21-
if(SWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS VERSION_GREATER_EQUAL 7.0)
22-
list(REMOVE_ITEM SUPPORTED_WATCHOS_SIMULATOR_ARCHS "i386")
23-
endif()
24-
if(SWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS VERSION_GREATER_EQUAL 9.0)
25-
list(REMOVE_ITEM SUPPORTED_WATCHOS_ARCHS "armv7k")
26-
endif()
27-
2821
is_sdk_requested(OSX swift_build_osx)
2922
if(swift_build_osx)
3023
configure_sdk_darwin(

cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function(_report_sdk prefix)
6868
endfunction()
6969

7070
# 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)
7272
execute_process(COMMAND
7373
/usr/libexec/PlistBuddy -c "Print :SupportedTargets:${os}:Archs" ${sdk_path}/SDKSettings.plist
7474
OUTPUT_VARIABLE sdk_supported_archs
@@ -87,11 +87,11 @@ function(remove_sdk_unsupported_archs name os sdk_path architectures_var)
8787
# 32-bit iOS simulator is not listed explicitly in SDK settings.
8888
message(STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch}")
8989
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")
9191
# 32-bit watchOS is not listed explicitly in SDK settings.
9292
message(STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch}")
9393
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")
9595
# 32-bit watchOS simulator is not listed explicitly in SDK settings.
9696
message(STATUS "Assuming ${name} SDK at ${sdk_path} supports architecture ${arch}")
9797
list(APPEND architectures ${arch})
@@ -229,7 +229,7 @@ macro(configure_sdk_darwin
229229
endif()
230230

231231
# 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)
233233

234234
list_intersect(
235235
"${SWIFT_DARWIN_MODULE_ARCHS}" # lhs

0 commit comments

Comments
 (0)