Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(800)

Side by Side Diff: webrtc/build/ios/build_ios_libs.sh

Issue 2655893003: Validate the build type argument value in function build_webrtc (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright 2015 The WebRTC project authors. All Rights Reserved. 3 # Copyright 2015 The WebRTC project authors. All Rights Reserved.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license 5 # Use of this source code is governed by a BSD-style license
6 # that can be found in the LICENSE file in the root of the source 6 # that can be found in the LICENSE file in the root of the source
7 # tree. An additional intellectual property rights grant can be found 7 # tree. An additional intellectual property rights grant can be found
8 # in the file PATENTS. All contributing project authors may 8 # in the file PATENTS. All contributing project authors may
9 # be found in the AUTHORS file in the root of the source tree. 9 # be found in the AUTHORS file in the root of the source tree.
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 if [[ -n "${custom_gn_options}" ]]; then 66 if [[ -n "${custom_gn_options}" ]]; then
67 GN_ARGS="${GN_ARGS} ${custom_gn_options}" 67 GN_ARGS="${GN_ARGS} ${custom_gn_options}"
68 fi 68 fi
69 69
70 # Generate static or dynamic. 70 # Generate static or dynamic.
71 if [[ ${build_type} = "static_only" ]]; then 71 if [[ ${build_type} = "static_only" ]]; then
72 GN_TARGET_NAME="rtc_sdk_objc" 72 GN_TARGET_NAME="rtc_sdk_objc"
73 elif [[ ${build_type} == "framework" ]]; then 73 elif [[ ${build_type} == "framework" ]]; then
74 GN_TARGET_NAME="rtc_sdk_framework_objc" 74 GN_TARGET_NAME="rtc_sdk_framework_objc"
75 GN_ARGS="${GN_ARGS} enable_dsyms=true enable_stripping=true" 75 GN_ARGS="${GN_ARGS} enable_dsyms=true enable_stripping=true"
76 else
77 echo "Build type \"${build_type}\" is not supported."
78 exit 1
76 fi 79 fi
77 80
78 echo "Building WebRTC with args: ${GN_ARGS}" 81 echo "Building WebRTC with args: ${GN_ARGS}"
79 gn gen ${OUTPUT_DIR} --args="${GN_ARGS}" 82 gn gen ${OUTPUT_DIR} --args="${GN_ARGS}"
80 echo "Building target: ${GN_TARGET_NAME}" 83 echo "Building target: ${GN_TARGET_NAME}"
81 ninja -C ${OUTPUT_DIR} ${GN_TARGET_NAME} 84 ninja -C ${OUTPUT_DIR} ${GN_TARGET_NAME}
82 85
83 # Strip debug symbols to reduce size. 86 # Strip debug symbols to reduce size.
84 if [[ ${build_type} = "static_only" ]]; then 87 if [[ ${build_type} = "static_only" ]]; then
85 strip -S ${OUTPUT_DIR}/obj/webrtc/sdk/lib${GN_TARGET_NAME}.a -o \ 88 strip -S ${OUTPUT_DIR}/obj/webrtc/sdk/lib${GN_TARGET_NAME}.a -o \
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 VERSION_NUMBER="${MAJOR_MINOR}.${WEBRTC_REVISION}" 207 VERSION_NUMBER="${MAJOR_MINOR}.${WEBRTC_REVISION}"
205 echo "Substituting revision number: ${VERSION_NUMBER}" 208 echo "Substituting revision number: ${VERSION_NUMBER}"
206 PlistBuddy -c "Set :CFBundleVersion ${VERSION_NUMBER}" ${INFOPLIST_PATH} 209 PlistBuddy -c "Set :CFBundleVersion ${VERSION_NUMBER}" ${INFOPLIST_PATH}
207 plutil -convert binary1 ${INFOPLIST_PATH} 210 plutil -convert binary1 ${INFOPLIST_PATH}
208 else 211 else
209 echo "BUILD_TYPE ${BUILD_TYPE} not supported." 212 echo "BUILD_TYPE ${BUILD_TYPE} not supported."
210 exit 1 213 exit 1
211 fi 214 fi
212 215
213 echo "Done." 216 echo "Done."
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698