Xcode 13.3 build "out of memory"

Hi everyone,

I'm new to iOS development and CI/CD and wondered if someone may be able to help

We have a build machine that uses Fastlane to build the app and distribute to testers etc

When the Xcode path is set to 13.1 it runs fine and it did on 13.2 (it looks like this version has automatically updated to 13.3 on the build machine)

On my local machine everything compiles fine on 13.1 AND 13.3 but now when the pipeline runs it gets to a certain package/point in the build process and fails with:

LLVM ERROR: out of memory
Allocation failed

The code branch is exactly the same, no changes to packages between Xcode builds. Any idea why 13.3 would throw a memory allocation error and what I could try next? Xcode 13.1 and 13.3 + command lines tools are both installed

Thank you!

Same here, having the same issue

Same for me, while creating the archive :(

As suggested, I disabled Bitcode on my main Flutter project and on one of the linked pod (printing)

Then I had to replace UI_USER_INTERFACE_IDIOM() with UIDevice.current.userInterfaceIdiom on DKImagePickerController pod

Ultimately switching from UI_USER_INTERFACE_IDIOM() to UIDevice.current.userInterfaceIdiom in a dependency also did the trick (didn't have to disable bitcode in that case).

With the new XCODE version 13.3.1, the Bitcode issue is solved

thanks for this, hopefully nothing new breaks :D

I upgraded Xcode to 13.1.1, still, I'm facing the same issue.

Also, I tried -Onone instead of -Osize. That also didn't resolve it.

Stack Trace:

LLVM ERROR: out of memory
Allocation failed
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
Stack dump:
0.	Program arguments: /Users/agam.mahajan/Downloads/Xcode_13.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/agam.mahajan/Library/Developer/Xcode/DerivedData/swiggy-fpqeaxzzxjoxjtfopejvjwuvlfci/Build/Intermediates.noindex/ArchiveIntermediates/swiggy/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/DLS.build/Objects-normal/arm64/RestaurantTextBlock.bc -embed-bitcode -target arm64-apple-ios11.0 -Xllvm -aarch64-use-tbi -O -disable-llvm-optzns -module-name DLS -o /Users/agam.mahajan/Library/Developer/Xcode/DerivedData/swiggy-fpqeaxzzxjoxjtfopejvjwuvlfci/Build/Intermediates.noindex/ArchiveIntermediates/swiggy/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/DLS.build/Objects-normal/arm64/RestaurantTextBlock.o
1.	Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)
2.	Compiling with the current language version
3.	Running pass 'Function Pass Manager' on module '/Users/agam.mahajan/Library/Developer/Xcode/DerivedData/swiggy-fpqeaxzzxjoxjtfopejvjwuvlfci/Build/Intermediates.noindex/ArchiveIntermediates/swiggy/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/DLS.build/Objects-normal/arm64/RestaurantTextBlock.bc'.
4.	Running pass 'ObjC ARC contraction' on function '@_ZL15ASDimensionMaked'

Confirmed that Xcode 13.3.1 does not solve the "LLVM ERROR: out of memory" when archiving and when error log reports "Embedding bitcode".

Hi,

I have the same issue with Xcode 13.3.1.

Any news?

Thanks.

Same issue in Xcode 13.3.1.

LLVM ERROR: out of memory
Allocation failed

Solution:

Build Settings -> Enable Bitcode (No)

Facing the exact same problem on Xcode 13.3.1. Fixed it by using UIDevice.current.userInterfaceIdiom in place of UI_USER_INTERFACE_IDIOM() as mentioned above.

This issue is fixed for me with the latest release of XCode 13.4.1 Feedback provided via https://feedbackassistant.apple.com/feedback/9993526

Xcode 13.3 build "out of memory"
 
 
Q