From b5220d9dff295862c4d7389bf1ae9a7d75e90b54 Mon Sep 17 00:00:00 2001
From: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Date: Mon, 15 Jun 2015 11:16:48 +0200
Subject: [PATCH] pbuilder_pbx: disable bit code for Xcode projects
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

With Xcode7, Apple added support for compiling apps to bit code
instead of binary (*). But this is only supported when the deployment
target is at least 6.0. And in Qt-5.5, the deployment target is
still set to 5.1.1. The result is that every Qt application will fail
building once people move to Xcode7.

Instead of bumping the deployment target (which we plan to do
for Qt-5.6), we choose to switch off bit code for now.

 *: https://developer.apple.com/library/prerelease/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html

Change-Id: I23001563439a7726506b7cd2dc77a82533b8a27b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
---
 qmake/generators/mac/pbuilder_pbx.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index deacac2c837..81bb0683ac5 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -1408,6 +1408,10 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
 
         QMap<QString, QString> settings;
         settings.insert("COPY_PHASE_STRIP", (as_release ? "YES" : "NO"));
+        // Bitcode is only supported with a deployment target >= iOS 6.0.
+        // Disable it for now, and consider switching it on when later
+        // bumping the deployment target.
+        settings.insert("ENABLE_BITCODE", "NO");
         settings.insert("GCC_GENERATE_DEBUGGING_SYMBOLS", as_release ? "NO" : "YES");
         if(!as_release)
             settings.insert("GCC_OPTIMIZATION_LEVEL", "0");
-- 
GitLab