Skip to content

Commit

Permalink
Update ios.toolchain.cmake
Browse files Browse the repository at this point in the history
Added arm64 as architecture to allow Apple Silicon simulators to be used when using the toolchain to generate xcode targets. Xcode 12.0+ only! Use the OS64Combined target to get the added benefit.
  • Loading branch information
leetal authored Aug 10, 2023
1 parent b0e8b29 commit 350f999
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ios.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,12 @@ elseif(PLATFORM_INT STREQUAL "OS64COMBINED")
set(SDK_NAME iphoneos)
if(MODERN_CMAKE)
if(NOT ARCHS)
if (XCODE_VERSION_INT VERSION_GREATER 10.0)
set(ARCHS arm64 x86_64) # FIXME: Add arm64e when Apple has fixed the integration issues with it, libarclite_iphoneos.a is currently missing bitcode markers for example
if (XCODE_VERSION_INT VERSION_GREATER 12.0)
set(ARCHS arm64 x86_64)
set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "arm64")
set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "x86_64")
set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "x86_64 arm64")
set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "arm64")
set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "x86_64")
set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "x86_64 arm64")
else()
set(ARCHS arm64 x86_64)
set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "arm64")
Expand Down

0 comments on commit 350f999

Please sign in to comment.