Skip to content

Commit

Permalink
Merge pull request #17 from MSNexploder/arm64e-support
Browse files Browse the repository at this point in the history
Support arm64e (A12 and beyond)
  • Loading branch information
leetal authored Nov 1, 2018
2 parents c812557 + f8e2843 commit d418d17
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ This will build and install the library for the given IOS_PLATFORM.

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

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

`-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)
`-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)

__*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.*__

Expand Down
16 changes: 13 additions & 3 deletions ios.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#
# IOS_PLATFORM: OS (default) or SIMULATOR or SIMULATOR64 or TVOS or SIMULATOR_TVOS or WATCHOS
# OS = Build for iPhoneOS.
# OS64 = Build for arm64 iPhoneOS.
# SIMULATOR = Build for x86 i386 iPhone Simulator.
# SIMULATOR64 = Build for x86_64 iPhone Simulator.
# TVOS = Build for AppleTVOS.
Expand All @@ -70,7 +71,8 @@
# ENABLE_ARC: (1|0) Enables or disables ARC support. Default 1 (true, ARC enabled by default)
# ENABLE_VISIBILITY: (1|0) Enables or disables symbol visibility support. Default 0 (false, visibility hidden by default)
# IOS_ARCH: (armv7 armv7s arm64 i386 x86_64) If specified, will override the default architectures for the given IOS_PLATFORM
# OS = armv7 armv7s arm64
# OS = armv7 armv7s arm64 arm64e
# OS64 = arm64 arm64e
# SIMULATOR = i386
# SIMULATOR64 = x86_64
# TVOS = arm64
Expand Down Expand Up @@ -139,12 +141,20 @@ set(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING
if (IOS_PLATFORM STREQUAL "OS")
set(XCODE_IOS_PLATFORM iphoneos)
if(NOT IOS_ARCH)
set(IOS_ARCH armv7 armv7s arm64)
if (XCODE_VERSION VERSION_GREATER 10.0)
set(IOS_ARCH armv7 armv7s arm64 arm64e)
else()
set(IOS_ARCH armv7 armv7s arm64)
endif()
endif()
elseif (IOS_PLATFORM STREQUAL "OS64")
set(XCODE_IOS_PLATFORM iphoneos)
if(NOT IOS_ARCH)
set(IOS_ARCH arm64)
if (XCODE_VERSION VERSION_GREATER 10.0)
set(IOS_ARCH arm64 arm64e)
else()
set(IOS_ARCH arm64)
endif()
endif()
elseif (IOS_PLATFORM STREQUAL "SIMULATOR")
set(XCODE_IOS_PLATFORM iphonesimulator)
Expand Down

0 comments on commit d418d17

Please sign in to comment.