diff options
author | Jason Wray <jason@mapbox.com> | 2016-09-29 18:35:07 -0400 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2016-10-25 22:34:50 -0700 |
commit | 5cacbb45058005e72baa49b8d8cd0eb2deb9d029 (patch) | |
tree | fb6adf6cd45ccd2f3d8af8328a469cfaa19f22fa /platform/ios | |
parent | c64a0c24866b9d199153a1fe65c455d5807b50a6 (diff) | |
download | qtlocation-mapboxgl-5cacbb45058005e72baa49b8d8cd0eb2deb9d029.tar.gz |
[ios][build] Generate debug symbols for all builds
Fixes the issue where our stripped dynamic build did not have a valid dSYM.
Disabling GCC_GENERATE_DEBUGGING_SYMBOLS for SYMBOLS=NO builds meant
that those builds had no debug symbols to strip or add to a dSYM.
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/DEVELOPING.md | 2 | ||||
-rwxr-xr-x | platform/ios/scripts/package.sh | 12 |
2 files changed, 6 insertions, 8 deletions
diff --git a/platform/ios/DEVELOPING.md b/platform/ios/DEVELOPING.md index 4efc6af480..a31eac284d 100644 --- a/platform/ios/DEVELOPING.md +++ b/platform/ios/DEVELOPING.md @@ -51,7 +51,7 @@ You can customize the build output by passing the following arguments into the ` * `BUILDTYPE=Release` will optimize for distribution. Defaults to `Debug`. * `BUILD_DEVICE=false` builds only for the iOS Simulator. * `FORMAT=dynamic` builds only a dynamic framework. `FORMAT=static` builds only a static framework, for compatibility with iOS 7.x. -* `SYMBOLS=NO` strips the build output of any debug symbols, yielding much smaller binaries. +* `SYMBOLS=NO` strips the build output of any debug symbols, yielding much smaller binaries. Defaults to `YES`. An example command that creates a dynamic framework suitable for eventual App Store distribution: diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh index c753c63dfd..8ad779d6b5 100755 --- a/platform/ios/scripts/package.sh +++ b/platform/ios/scripts/package.sh @@ -11,7 +11,7 @@ PRODUCTS=${DERIVED_DATA}/Build/Products BUILDTYPE=${BUILDTYPE:-Debug} BUILD_FOR_DEVICE=${BUILD_DEVICE:-true} -GCC_GENERATE_DEBUGGING_SYMBOLS=${SYMBOLS:-YES} +SYMBOLS=${SYMBOLS:-YES} BUILD_DYNAMIC=true BUILD_STATIC=true @@ -42,7 +42,7 @@ if [[ ${BUILD_FOR_DEVICE} == true ]]; then fi IOS_SDK_VERSION=`xcrun --sdk ${SDK} --show-sdk-version` -echo "Configuring ${FORMAT:-dynamic and static} ${BUILDTYPE} framework for ${SDK}; symbols: ${GCC_GENERATE_DEBUGGING_SYMBOLS}; self-contained static framework: ${SELF_CONTAINED:-NO}" +echo "Configuring ${FORMAT:-dynamic and static} ${BUILDTYPE} framework for ${SDK}; symbols: ${SYMBOLS}; self-contained static framework: ${SELF_CONTAINED:-NO}" function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; } function finish { >&2 echo -en "\033[0m"; } @@ -79,7 +79,6 @@ elif [[ ${BUILD_STATIC} == true ]]; then fi xcodebuild \ - GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \ CURRENT_PROJECT_VERSION=${PROJ_VERSION} \ CURRENT_SHORT_VERSION=${SHORT_VERSION} \ CURRENT_SEMANTIC_VERSION=${SEM_VERSION} \ @@ -94,7 +93,6 @@ xcodebuild \ if [[ ${BUILD_FOR_DEVICE} == true ]]; then xcodebuild \ - GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \ CURRENT_PROJECT_VERSION=${PROJ_VERSION} \ CURRENT_SHORT_VERSION=${SHORT_VERSION} \ CURRENT_SEMANTIC_VERSION=${SEM_VERSION} \ @@ -111,7 +109,7 @@ fi LIBS=(Mapbox.a mbgl-core.a mbgl-platform-ios.a) # https://medium.com/@syshen/create-an-ios-universal-framework-148eb130a46c -if [[ "${BUILD_FOR_DEVICE}" == true ]]; then +if [[ ${BUILD_FOR_DEVICE} == true ]]; then if [[ ${BUILD_STATIC} == true ]]; then step "Assembling static framework for iOS Simulator and devices…" mkdir -p ${OUTPUT}/static/${NAME}.framework @@ -168,8 +166,8 @@ else cp -rv ${PRODUCTS}/${BUILDTYPE}-iphonesimulator/Settings.bundle ${STATIC_SETTINGS_DIR} fi -if [[ "${GCC_GENERATE_DEBUGGING_SYMBOLS}" == false ]]; then - step "Stripping binaries…" +if [[ ${SYMBOLS} = NO ]]; then + step "Stripping symbols from binaries…" if [[ ${BUILD_STATIC} == true ]]; then strip -Sx "${OUTPUT}/static/${NAME}.framework/${NAME}" fi |