How to create arm64e slice with bitcode enabled?

I am creating a universal dynamic library


# Build the framework for device and for simulator (using

# all needed architectures).

xcodebuild -target "${TARGET_NAME}" -configuration Release -arch arm64e -arch arm64 -arch armv7 -arch armv7s only_active_arch=no defines_module=yes -sdk "iphoneos" ENABLE_BITCODE=YES OTHER_CFLAGS="-fembed-bitcode" BITCODE_GENERATION_MODE=bitcode CONFIGURATION_BUILD_DIR="${SRCROOT}/build/Release-iphoneos" UseModernBuildSystem=YES SUPPORTS_MACCATALYST=NO OBJROOT="$OBJROOT/DependentBuilds"

xcodebuild -target "${TARGET_NAME}" -configuration Release -arch x86_64 -arch i386 only_active_arch=no defines_module=yes -sdk "iphonesimulator" ENABLE_BITCODE=YES OTHER_CFLAGS="-fembed-bitcode" BITCODE_GENERATION_MODE=bitcode CONFIGURATION_BUILD_DIR="${SRCROOT}/build/Release-iphonesimulator" UseModernBuildSystem=YES SUPPORTS_MACCATALYST=NO OBJROOT="$OBJROOT/DependentBuilds"


# Replace the framework executable within the framework with

# a new version created by merging the device and simulator

# frameworks' executables with lipo.

lipo -create -output "${HOME}/Desktop/${FRAMEWORK_NAME}Dynamic/Release/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" "${SRCROOT}/build/Release-iphoneos/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" "${SRCROOT}/build/Release-iphonesimulator/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}"

lipo -create -output "${SRCROOT}/../../../iOSAutoSrc/LibraryBuilds/DynamicFrameworks/Release/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" "${SRCROOT}/build/Release-iphoneos/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" "${SRCROOT}/build/Release-iphonesimulator/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}"


Then using:


otool -arch arm64e -l "${HOME}/Desktop/${FRAMEWORK_NAME}Dynamic/Release/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" | grep __LLVM


This works for arm64 and armv7s, but not for arm64e. What is missing?

I just added arm64e support to the framework that I work on, and I have run into the exact same question. My build script expects to find a BCSymbolMap for every UUID in the universal/fat framework executable file. This expectation is no longer true since I added arm64e to the build process. Obviously, this missing BCSymbolMap is appropriate given that the arm64e slice does not include bitcode, so the underlying question is why no bitcode?


I am left to wonder if this missing bitcode is a result of arm64e continuing to be considered a "preview" of the technology. The original announcement of arm64e in the Xcode 10.1 Release Notes calls it a preview and further states that, "The App Store and TestFlight don't accept submissions containing arm64e. Xcode will remove arm64e content from your app when you distribute from the Organizer window." I had presumed that, by now, this caveat would no longer apply. However, I cannot find any mention of there being a final/non-preview version of arm64e support in any of the subsequent Xcode Release Notes. Furthermore, the Preparing Your App to Work with Pointer Authentication continues to exist, and it makes a similar claim.

Hi, I'm updating my binary framework to support arm64e, and run into same issue.
I've added arm64e manually to ARCHS, but bitcode is missing.

I'm not sure what is the right way to update library to support arm64e.
arm64e isn't supported for distribution builds at this time, for exactly the reasons @ sanvital_IO named.
Have you tested this solution on the M1 chip?
How to create arm64e slice with bitcode enabled?
 
 
Q