From 5c3fe77dd8efe8fed86708fb29ce219c33921d75 Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 7 Oct 2015 18:16:12 -0700 Subject: [PATCH] iosbuild: fix linking with Xcode 7 / iOS SDK 9 -fembed-bitcode is the default, a framework built without this flag will fail to link against an application using it. BUG=267 (cherry picked from commit db1321a6a2714b09cdf93cb05a2fa6eb3018899c) Change-Id: I83461cb058b1866ac99b3f0bdfa890933e88ed26 --- iosbuild.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iosbuild.sh b/iosbuild.sh index edf8225b..52626272 100755 --- a/iosbuild.sh +++ b/iosbuild.sh @@ -41,6 +41,8 @@ LIBLIST='' if [[ -z "${SDK}" ]]; then echo "iOS SDK not available" exit 1 +elif [[ ${SDK%%.*} -gt 8 ]]; then + EXTRA_CFLAGS="-fembed-bitcode" elif [[ ${SDK} < 6.0 ]]; then echo "You need iOS SDK version 6.0 or above" exit 1 @@ -94,7 +96,7 @@ for PLATFORM in ${PLATFORMS}; do SDKROOT="${PLATFORMSROOT}/" SDKROOT+="${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDK}.sdk/" CFLAGS="-arch ${ARCH2:-${ARCH}} -pipe -isysroot ${SDKROOT} -O3 -DNDEBUG" - CFLAGS+=" -miphoneos-version-min=6.0" + CFLAGS+=" -miphoneos-version-min=6.0 ${EXTRA_CFLAGS}" set -x export PATH="${DEVROOT}/usr/bin:${OLDPATH}"