summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2015-06-17 12:48:11 -0700
committerJustin R. Miller <incanus@codesorcery.net>2015-06-17 12:48:11 -0700
commit73737445ec0333b701b64613d8b92e18f45ea314 (patch)
tree7aaf30a3efd042ebec7590991383d38721f9270c
parent0686807a21db934f765d2f8576882ed02f8b594d (diff)
downloadqtlocation-mapboxgl-73737445ec0333b701b64613d8b92e18f45ea314.tar.gz
fixes #1650: default to no symbols for release builds, but build both
-rw-r--r--Makefile3
-rwxr-xr-xscripts/ios/package.sh11
-rwxr-xr-xscripts/ios/publish.sh9
-rwxr-xr-xscripts/ios/run.sh14
4 files changed, 30 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 1c15773b44..34af9b85e2 100644
--- a/Makefile
+++ b/Makefile
@@ -140,6 +140,9 @@ isim: Xcode/ios
ipackage: Xcode/ios
JOBS=$(JOBS) ./scripts/ios/package.sh
+ipackage-strip: Xcode/ios
+ JOBS=$(JOBS) ./scripts/ios/package.sh strip
+
ipackage-sim: Xcode/ios
JOBS=$(JOBS) ./scripts/ios/package.sh sim
diff --git a/scripts/ios/package.sh b/scripts/ios/package.sh
index 4d31b06f9a..cccaa4aad2 100755
--- a/scripts/ios/package.sh
+++ b/scripts/ios/package.sh
@@ -9,10 +9,15 @@ OUTPUT=build/ios/pkg
IOS_SDK_VERSION=`xcrun --sdk iphoneos --show-sdk-version`
LIBUV_VERSION=0.10.28
-if [[ ${#} -eq 0 ]]; then
+if [[ ${#} -eq 0 ]]; then # e.g. "make ipackage"
BUILD_FOR_DEVICE=true
-else
+ GCC_GENERATE_DEBUGGING_SYMBOLS="YES"
+elif [[ ${1} == "sim" ]]; then # e.g. "make ipackage-sim"
BUILD_FOR_DEVICE=false
+ GCC_GENERATE_DEBUGGING_SYMBOLS="YES"
+else # e.g. "make ipackage-strip"
+ BUILD_FOR_DEVICE=true
+ GCC_GENERATE_DEBUGGING_SYMBOLS="NO"
fi
function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; }
@@ -44,6 +49,7 @@ if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
xcodebuild -sdk iphoneos${IOS_SDK_VERSION} \
ARCHS="arm64 armv7 armv7s" \
ONLY_ACTIVE_ARCH=NO \
+ GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \
-project ./build/ios/mbgl.xcodeproj \
-configuration ${BUILDTYPE} \
-target everything \
@@ -54,6 +60,7 @@ step "Building iOS Simulator targets..."
xcodebuild -sdk iphonesimulator${IOS_SDK_VERSION} \
ARCHS="x86_64 i386" \
ONLY_ACTIVE_ARCH=NO \
+ GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \
-project ./build/ios/mbgl.xcodeproj \
-configuration ${BUILDTYPE} \
-target everything \
diff --git a/scripts/ios/publish.sh b/scripts/ios/publish.sh
index 73356c14cb..484ee1fb81 100755
--- a/scripts/ios/publish.sh
+++ b/scripts/ios/publish.sh
@@ -6,14 +6,21 @@ set -u
#
# iOS release tag format is `vX.Y.Z`; `X.Y.Z` gets passed in
+# In the case of symbolicated builds, we also append the `style`.
#
PUBLISH_VERSION="$1"
+if [[ ${#} -eq 2 ]]; then
+ PUBLISH_STYLE="-$2"
+else
+ PUBLISH_STYLE=""
+fi
+
#
# zip
#
cd build/ios/pkg/static
-ZIP=mapbox-gl-ios-${PUBLISH_VERSION}.zip
+ZIP=mapbox-gl-ios-${PUBLISH_VERSION}${PUBLISH_STYLE}.zip
rm -f ../${ZIP}
zip -r ../${ZIP} *
#
diff --git a/scripts/ios/run.sh b/scripts/ios/run.sh
index 82a701351f..6d002d4853 100755
--- a/scripts/ios/run.sh
+++ b/scripts/ios/run.sh
@@ -18,12 +18,18 @@ PUBLISH_VERSION=${PUBLISH_TAG[1],-}
################################################################################
if [[ ${PUBLISH_PLATFORM} = 'ios' ]]; then
- # build & package iOS
- mapbox_time "package_ios" \
+ # default, with debug symbols
+ mapbox_time "package_ios_symbols" \
make ipackage
- # publish iOS build
- mapbox_time "deploy_ios" \
+ mapbox_time "deploy_ios_symbols"
+ ./scripts/ios/publish.sh "${PUBLISH_VERSION}" symbols
+
+ # no debug symbols, for smaller distribution
+ mapbox_time "package_ios_stripped" \
+ make ipackage-strip
+
+ mapbox_time "deploy_ios_stripped"
./scripts/ios/publish.sh "${PUBLISH_VERSION}"
else
# build & test iOS