Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is "Build Active Architecture Only" even an option for release builds?

Tags:

enter image description here

Why would anyone ever set this option to YES for a release build in practice? So you gain a little build time, but how often do you make release builds? And why would you ever want only the architecture for a release build to be only that of the connected device (even if your connected device has the lowest common denominator of backwards compatible architectures you are supporting)?

like image 567
Adam Johns Avatar asked May 16 '15 02:05

Adam Johns


People also ask

What does build active architecture only mean?

The "build active architecture only" setting causes everything except the current Mac's architecture to be ignored (and the current one is of course valid), hiding the problem. Instead, you should look up a row or two in the settings, and change the "Architectures" setting to "Standard".

How do I change my build settings in Xcode?

Choose the project in the Project Navigator on the left. Select the Configurations target from the Targets section and click the Build Settings tab at the top. The Build Settings tab shows the build settings for the Configurations target. It's possible to expand this list with build settings that you define.


1 Answers

Release is not just for submitting to the app store. Selecting a release build turns on lots of compiler optimizations that generate fast code, and the memory footprint is different. It can be useful to test release builds for various reasons.

Swift code in particular is really slow in debug builds if it deals with lots of arrays. It's better with Swift 1.2, but still quite slow.

If you're testing on your development device it doesn't really make sense to compile for all the different supported architectures. Building is much faster for just your active architecture.

like image 175
Duncan C Avatar answered Sep 24 '22 03:09

Duncan C