Skip to content

Commit 45ba5ce

Browse files
committed
[arm64e] Add arm64e support into Swift's build system
1 parent 869e579 commit 45ba5ce

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ endmacro()
106106

107107
macro(configure_sdks_darwin)
108108
set(macosx_arch "x86_64")
109-
set(iphoneos_arch "arm64" "armv7")
109+
set(iphoneos_arch "arm64" "arm64e" "armv7")
110110
set(appletvos_arch "arm64")
111111
set(watchos_arch "armv7k")
112112

cmake/modules/DarwinSDKs.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ option(SWIFT_ENABLE_IOS32
33
TRUE)
44

55
if(SWIFT_ENABLE_IOS32)
6-
set(SUPPORTED_IOS_ARCHS "armv7;armv7s;arm64")
6+
set(SUPPORTED_IOS_ARCHS "armv7;armv7s;arm64;arm64e")
77
set(SUPPORTED_IOS_SIMULATOR_ARCHS "i386;x86_64")
88
else()
9-
set(SUPPORTED_IOS_ARCHS "arm64")
9+
set(SUPPORTED_IOS_ARCHS "arm64;arm64e")
1010
set(SUPPORTED_IOS_SIMULATOR_ARCHS "x86_64")
1111
endif()
1212

cmake/modules/SwiftSetIfArchBitness.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ function(set_if_arch_bitness var_name)
1616
set("${var_name}" "${SIA_CASE_32_BIT}" PARENT_SCOPE)
1717
elseif("${SIA_ARCH}" STREQUAL "x86_64" OR
1818
"${SIA_ARCH}" STREQUAL "arm64" OR
19+
"${SIA_ARCH}" STREQUAL "arm64e" OR
1920
"${SIA_ARCH}" STREQUAL "aarch64" OR
2021
"${SIA_ARCH}" STREQUAL "powerpc64" OR
2122
"${SIA_ARCH}" STREQUAL "powerpc64le" OR

utils/build-script-impl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ function verify_host_is_supported() {
420420
| iphoneos-armv7 \
421421
| iphoneos-armv7s \
422422
| iphoneos-arm64 \
423+
| iphoneos-arm64e \
423424
| appletvsimulator-x86_64 \
424425
| appletvos-arm64 \
425426
| watchsimulator-i386 \
@@ -519,6 +520,13 @@ function set_build_options_for_host() {
519520
SWIFT_HOST_TRIPLE="arm64-apple-ios${DARWIN_DEPLOYMENT_VERSION_IOS}"
520521
llvm_target_arch="AArch64"
521522

523+
SWIFT_HOST_VARIANT_SDK="IOS"
524+
cmake_osx_deployment_target=""
525+
;;
526+
iphoneos-arm64e)
527+
SWIFT_HOST_TRIPLE="arm64e-apple-ios${DARWIN_DEPLOYMENT_VERSION_IOS}"
528+
llvm_target_arch="AArch64"
529+
522530
SWIFT_HOST_VARIANT_SDK="IOS"
523531
cmake_osx_deployment_target=""
524532
;;

utils/swift_build_support/swift_build_support/targets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class StdlibDeploymentTarget(object):
117117
OSX = DarwinPlatform("macosx", archs=["x86_64"],
118118
sdk_name="OSX")
119119

120-
iOS = DarwinPlatform("iphoneos", archs=["armv7", "armv7s", "arm64"],
120+
iOS = DarwinPlatform("iphoneos", archs=["armv7", "armv7s", "arm64", "arm64e"],
121121
sdk_name="IOS")
122122
iOSSimulator = DarwinPlatform("iphonesimulator", archs=["i386", "x86_64"],
123123
sdk_name="IOS_SIMULATOR",

0 commit comments

Comments
 (0)