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

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

Issue 2204783002: Don't build VP9 for iOS framework. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 echo "Failed to find library merging script." >&2 44 echo "Failed to find library merging script." >&2
45 exit 1 45 exit 1
46 fi 46 fi
47 } 47 }
48 48
49 function build_webrtc { 49 function build_webrtc {
50 local base_output_dir=$1 50 local base_output_dir=$1
51 local flavor=$2 51 local flavor=$2
52 local target_arch=$3 52 local target_arch=$3
53 local build_type=$4 53 local build_type=$4
54 local libvpx_build_vp9=$5
54 55
55 local ninja_output_dir=${base_output_dir}/${target_arch}_ninja 56 local ninja_output_dir=${base_output_dir}/${target_arch}_ninja
56 local library_output_dir=${base_output_dir}/${target_arch}_libs 57 local library_output_dir=${base_output_dir}/${target_arch}_libs
57 if [[ ${target_arch} = 'arm' || ${target_arch} = 'arm64' ]]; then 58 if [[ ${target_arch} = 'arm' || ${target_arch} = 'arm64' ]]; then
58 flavor="${flavor}-iphoneos" 59 flavor="${flavor}-iphoneos"
59 else 60 else
60 flavor="${flavor}-iphonesimulator" 61 flavor="${flavor}-iphonesimulator"
61 fi 62 fi
62 local ninja_flavor_dir=${ninja_output_dir}/${flavor} 63 local ninja_flavor_dir=${ninja_output_dir}/${flavor}
63 64
(...skipping 15 matching lines...) Expand all
79 override_visibility=1 80 override_visibility=1
80 elif [[ ${build_type} == "framework" ]]; then 81 elif [[ ${build_type} == "framework" ]]; then
81 echo "Building framework." 82 echo "Building framework."
82 else 83 else
83 echo "Unexpected build type: ${build_type}" 84 echo "Unexpected build type: ${build_type}"
84 exit 1 85 exit 1
85 fi 86 fi
86 87
87 export GYP_DEFINES="OS=ios target_arch=${target_arch} use_objc_h264=1 \ 88 export GYP_DEFINES="OS=ios target_arch=${target_arch} use_objc_h264=1 \
88 clang_xcode=1 ios_deployment_target=8.0 \ 89 clang_xcode=1 ios_deployment_target=8.0 \
89 ios_override_visibility=${override_visibility}" 90 ios_override_visibility=${override_visibility} \
91 libvpx_build_vp9=${libvpx_build_vp9}"
90 export GYP_GENERATORS="ninja" 92 export GYP_GENERATORS="ninja"
91 export GYP_GENERATOR_FLAGS="output_dir=${ninja_output_dir}" 93 export GYP_GENERATOR_FLAGS="output_dir=${ninja_output_dir}"
92 94
93 # GYP generation requires relative path for some reason. 95 # GYP generation requires relative path for some reason.
94 pushd ${WEBRTC_BASE_DIR} 96 pushd ${WEBRTC_BASE_DIR}
95 webrtc/build/gyp_webrtc.py ${gyp_file} 97 webrtc/build/gyp_webrtc.py ${gyp_file}
96 popd 98 popd
97 # Compile the target we're interested in. 99 # Compile the target we're interested in.
98 ninja -C ${ninja_flavor_dir} ${gyp_target} 100 ninja -C ${ninja_flavor_dir} ${gyp_target}
99 101
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 141
140 # Set default arguments. 142 # Set default arguments.
141 # Output directory for build artifacts. 143 # Output directory for build artifacts.
142 OUTPUT_DIR=${WEBRTC_BASE_DIR}/out_ios_libs 144 OUTPUT_DIR=${WEBRTC_BASE_DIR}/out_ios_libs
143 # The type of build to perform. Valid arguments are framework, static_only and 145 # The type of build to perform. Valid arguments are framework, static_only and
144 # legacy. 146 # legacy.
145 BUILD_TYPE="framework" 147 BUILD_TYPE="framework"
146 PERFORM_CLEAN=0 148 PERFORM_CLEAN=0
147 FLAVOR="Profile" 149 FLAVOR="Profile"
148 POINT_VERSION="0" 150 POINT_VERSION="0"
151 # TODO(tkchin): Add ability to pass in a flag to build vp9. Odds are mobile
152 # clients will not want it though because of the higher CPU usage.
153 LIBVPX_BUILD_VP9=0
149 154
150 # Parse arguments. 155 # Parse arguments.
151 while getopts "hb:co:r:" opt; do 156 while getopts "hb:co:r:" opt; do
152 case "${opt}" in 157 case "${opt}" in
153 h) usage;; 158 h) usage;;
154 b) BUILD_TYPE="${OPTARG}";; 159 b) BUILD_TYPE="${OPTARG}";;
155 c) PERFORM_CLEAN=1;; 160 c) PERFORM_CLEAN=1;;
156 o) OUTPUT_DIR="${OPTARG}";; 161 o) OUTPUT_DIR="${OPTARG}";;
157 r) POINT_VERSION="${OPTARG}";; 162 r) POINT_VERSION="${OPTARG}";;
158 *) 163 *)
159 usage 164 usage
160 exit 1 165 exit 1
161 ;; 166 ;;
162 esac 167 esac
163 done 168 done
164 169
165 if [[ ${PERFORM_CLEAN} -ne 0 ]]; then 170 if [[ ${PERFORM_CLEAN} -ne 0 ]]; then
166 clean_artifacts ${OUTPUT_DIR} 171 clean_artifacts ${OUTPUT_DIR}
167 exit 0 172 exit 0
168 fi 173 fi
169 174
170 # Build all the common architectures. 175 # Build all the common architectures.
171 ARCHS=( "arm" "arm64" "ia32" "x64" ) 176 ARCHS=( "arm" "arm64" "ia32" "x64" )
172 for ARCH in "${ARCHS[@]}" 177 for ARCH in "${ARCHS[@]}"
173 do 178 do
174 echo "Building WebRTC arch: ${ARCH}" 179 echo "Building WebRTC arch: ${ARCH}"
175 build_webrtc ${OUTPUT_DIR} ${FLAVOR} $ARCH ${BUILD_TYPE} 180 build_webrtc ${OUTPUT_DIR} ${FLAVOR} $ARCH ${BUILD_TYPE} ${LIBVPX_BUILD_VP9}
176 done 181 done
177 182
178 ARM_NINJA_DIR=${OUTPUT_DIR}/arm_ninja/${FLAVOR}-iphoneos 183 ARM_NINJA_DIR=${OUTPUT_DIR}/arm_ninja/${FLAVOR}-iphoneos
179 ARM64_NINJA_DIR=${OUTPUT_DIR}/arm64_ninja/${FLAVOR}-iphoneos 184 ARM64_NINJA_DIR=${OUTPUT_DIR}/arm64_ninja/${FLAVOR}-iphoneos
180 IA32_NINJA_DIR=${OUTPUT_DIR}/ia32_ninja/${FLAVOR}-iphonesimulator 185 IA32_NINJA_DIR=${OUTPUT_DIR}/ia32_ninja/${FLAVOR}-iphonesimulator
181 X64_NINJA_DIR=${OUTPUT_DIR}/x64_ninja/${FLAVOR}-iphonesimulator 186 X64_NINJA_DIR=${OUTPUT_DIR}/x64_ninja/${FLAVOR}-iphonesimulator
182 187
183 if [[ ${BUILD_TYPE} = "framework" ]]; then 188 if [[ ${BUILD_TYPE} = "framework" ]]; then
184 # Merge the framework slices together into a FAT library by copying one arch 189 # Merge the framework slices together into a FAT library by copying one arch
185 # output and merging the rest in. 190 # output and merging the rest in.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 else 265 else
261 mkdir -p ${OUTPUT_HEADER_DIR} 266 mkdir -p ${OUTPUT_HEADER_DIR}
262 ln -sf ${INPUT_HEADER_DIR} ${OUTPUT_HEADER_DIR}/WebRTC 267 ln -sf ${INPUT_HEADER_DIR} ${OUTPUT_HEADER_DIR}/WebRTC
263 fi 268 fi
264 fi 269 fi
265 270
266 echo "Generating LICENSE.html." 271 echo "Generating LICENSE.html."
267 ${LICENSE_SCRIPT} ${OUTPUT_DIR}/arm64_libs ${OUTPUT_DIR} 272 ${LICENSE_SCRIPT} ${OUTPUT_DIR}/arm64_libs ${OUTPUT_DIR}
268 273
269 echo "Done!" 274 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