Skip to content

Commit fd7c0de

Browse files
benlangmuirian-twilightcoder
authored andcommitted
[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.
1 parent 16bebe8 commit fd7c0de

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
@@ -8,13 +8,6 @@ set(SUPPORTED_OSX_ARCHS "x86_64;arm64")
88
set(SUPPORTED_XROS_ARCHS "arm64;arm64e")
99
set(SUPPORTED_XROS_SIMULATOR_ARCHS "arm64")
1010

11-
if(SWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS VERSION_GREATER_EQUAL 7.0)
12-
list(REMOVE_ITEM SUPPORTED_WATCHOS_SIMULATOR_ARCHS "i386")
13-
endif()
14-
if(SWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS VERSION_GREATER_EQUAL 9.0)
15-
list(REMOVE_ITEM SUPPORTED_WATCHOS_ARCHS "armv7k")
16-
endif()
17-
1811
is_sdk_requested(OSX swift_build_osx)
1912
if(swift_build_osx)
2013
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)