diff options
author | Jason Wray <jason@mapbox.com> | 2016-09-29 18:35:07 -0400 |
---|---|---|
committer | Jason Wray <friedbunny@users.noreply.github.com> | 2016-09-30 18:49:05 -0400 |
commit | c72deacdcfa09327d24513b67170757c9c14df4e (patch) | |
tree | a930215d2d4ab671fa764013fba0a559ce026e29 /platform | |
parent | 43f70465f5db65170f0c348b12619a3250306b48 (diff) | |
download | qtlocation-mapboxgl-c72deacdcfa09327d24513b67170757c9c14df4e.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')
-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 704a357ce6..a948456203 100644 --- a/platform/ios/DEVELOPING.md +++ b/platform/ios/DEVELOPING.md @@ -53,7 +53,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 270647f857..4572401b33 100755 --- a/platform/ios/scripts/package.sh +++ b/platform/ios/scripts/package.sh @@ -11,7 +11,7 @@ PRODUCTS=${DERIVED_DATA} 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) # 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 @@ -179,8 +177,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 |