Search code examples
iosmacosbuildxcode12apple-silicon

Arm64e architecture for iOS framework


Once upon a time there was an Arm64e architecture promoted by Apple. It was during time Xcode 10.0 so 2 years ago. Started with A12 CPUs. Today, with Xcode 12.4 when choosing standard architectures for iOS platform still only Arm64 is default.

What did happened with Arm64e, and why it is not default?

Also, when I manually add it, and archiving for simulator I get:

ld: warning: ignoring file /Applications/Xcode12.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.iossim.a, missing required architecture arm64e in file /Applications/Xcode12.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.iossim.a (3 slices)

What's up? Does it mean that M1 macs does not support PAC(pointer authentication codes)? I bit puzzled, but I can not test on M1 mac yet.


Solution

  • The ABI is not stable yet.

    All devices since the A12 (including the M1) have full support for pointer authentication in hardware (in the terms of the ARM manual, FEAT_PAuth for A12/A12X/A13 and FEAT_PAuth2 for A14/M1).
    And Apple is actively using that for their own software: the kernelcache, all their apps, the entire dyld shared cache - those are all compiled for arm64e.

    But there have been weaknesses in PAC again and again and again and again, and in order to fix them, Apple was forced to change the ABI multiple times. Each of those changes required compiler changes and completely broke backwards-compatibility.
    For this reason, Apple currently can't reasonably have 3rd-party arm64e binaries - they would break on every ABI change. You can build and run arm64e binaries for yourself just fine, but until Apple decides that the time has come, only arm64 will be supported for 3rd parties.