Skip to content

Commit d418d17

Browse files
authored
Merge pull request #17 from MSNexploder/arm64e-support
Support arm64e (A12 and beyond)
2 parents c812557 + f8e2843 commit d418d17

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ This will build and install the library for the given IOS_PLATFORM.
3030

3131
* Set `-DIOS_PLATFORM` to "SIMULATOR" to build for iOS simulator 32 bit (i386)
3232
* Set `-DIOS_PLATFORM` to "SIMULATOR64" (example above) to build for iOS simulator 64 bit (x86_64)
33-
* Set `-DIOS_PLATFORM` to "OS" to build for Device (armv7, armv7s, arm64)
34-
* Set `-DIOS_PLATFORM` to "OS64" to build for Device (arm64 only)
33+
* Set `-DIOS_PLATFORM` to "OS" to build for Device (armv7, armv7s, arm64, arm64e)
34+
* Set `-DIOS_PLATFORM` to "OS64" to build for Device (arm64, arm64e)
3535
* Set `-DIOS_PLATFORM` to "TVOS" to build for tvOS (arm64)
3636
* Set `-DIOS_PLATFORM` to "SIMULATOR_TVOS" to build for tvOS Simulator (x86_64)
3737
* Set `-DIOS_PLATFORM` to "WATCHOS" to build for watchOS (armv7k)
@@ -44,7 +44,7 @@ This will build and install the library for the given IOS_PLATFORM.
4444

4545
`-DENABLE_VISIBILITY=(BOOL)` - Disabled by default, specify TRUE or 1 to enable symbol visibility support
4646

47-
`-DIOS_ARCH=(STRING)` - Valid values are: armv7, armv7s, arm64, i386, x86_64, armv7k, arm64_32. By default it will build for all valid architectures based on `-DIOS_PLATFORM` (see above)
47+
`-DIOS_ARCH=(STRING)` - Valid values are: armv7, armv7s, arm64, arm64e, i386, x86_64, armv7k, arm64_32. By default it will build for all valid architectures based on `-DIOS_PLATFORM` (see above)
4848

4949
__*The resulting binary will consist of only one platform. To combine all platforms into the same fat-library, use the LIPO tool. More information on this is available on the net.*__
5050

ios.toolchain.cmake

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
#
5454
# IOS_PLATFORM: OS (default) or SIMULATOR or SIMULATOR64 or TVOS or SIMULATOR_TVOS or WATCHOS
5555
# OS = Build for iPhoneOS.
56+
# OS64 = Build for arm64 iPhoneOS.
5657
# SIMULATOR = Build for x86 i386 iPhone Simulator.
5758
# SIMULATOR64 = Build for x86_64 iPhone Simulator.
5859
# TVOS = Build for AppleTVOS.
@@ -70,7 +71,8 @@
7071
# ENABLE_ARC: (1|0) Enables or disables ARC support. Default 1 (true, ARC enabled by default)
7172
# ENABLE_VISIBILITY: (1|0) Enables or disables symbol visibility support. Default 0 (false, visibility hidden by default)
7273
# IOS_ARCH: (armv7 armv7s arm64 i386 x86_64) If specified, will override the default architectures for the given IOS_PLATFORM
73-
# OS = armv7 armv7s arm64
74+
# OS = armv7 armv7s arm64 arm64e
75+
# OS64 = arm64 arm64e
7476
# SIMULATOR = i386
7577
# SIMULATOR64 = x86_64
7678
# TVOS = arm64
@@ -139,12 +141,20 @@ set(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING
139141
if (IOS_PLATFORM STREQUAL "OS")
140142
set(XCODE_IOS_PLATFORM iphoneos)
141143
if(NOT IOS_ARCH)
142-
set(IOS_ARCH armv7 armv7s arm64)
144+
if (XCODE_VERSION VERSION_GREATER 10.0)
145+
set(IOS_ARCH armv7 armv7s arm64 arm64e)
146+
else()
147+
set(IOS_ARCH armv7 armv7s arm64)
148+
endif()
143149
endif()
144150
elseif (IOS_PLATFORM STREQUAL "OS64")
145151
set(XCODE_IOS_PLATFORM iphoneos)
146152
if(NOT IOS_ARCH)
147-
set(IOS_ARCH arm64)
153+
if (XCODE_VERSION VERSION_GREATER 10.0)
154+
set(IOS_ARCH arm64 arm64e)
155+
else()
156+
set(IOS_ARCH arm64)
157+
endif()
148158
endif()
149159
elseif (IOS_PLATFORM STREQUAL "SIMULATOR")
150160
set(XCODE_IOS_PLATFORM iphonesimulator)

0 commit comments

Comments
 (0)