fixes #1650: default to no symbols for release builds, but build both

This commit is contained in:
Justin R. Miller
2015-06-17 12:48:11 -07:00
parent 0686807a21
commit 73737445ec
4 changed files with 30 additions and 7 deletions

View File

@@ -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

View File

@@ -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 \

View File

@@ -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} *
#

View File

@@ -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