OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Defines functions for envsetup.sh which sets up environment for building | 7 # Defines functions for envsetup.sh which sets up environment for building |
8 # Chromium on Android. The build can be either use the Android NDK/SDK or | 8 # Chromium on Android. The build can be either use the Android NDK/SDK or |
9 # android source tree. Each has a unique init function which calls functions | 9 # android source tree. Each has a unique init function which calls functions |
10 # prefixed with "common_" that is common for both environment setups. | 10 # prefixed with "common_" that is common for both environment setups. |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" | 150 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" |
151 } | 151 } |
152 | 152 |
153 | 153 |
154 ################################################################################ | 154 ################################################################################ |
155 # Prints out help message on usage. | 155 # Prints out help message on usage. |
156 ################################################################################ | 156 ################################################################################ |
157 print_usage() { | 157 print_usage() { |
158 echo "usage: ${0##*/} [--target-arch=value] [--help]" >& 2 | 158 echo "usage: ${0##*/} [--target-arch=value] [--help]" >& 2 |
159 echo "--target-arch=value target CPU architecture (arm=default, x86)" >& 2 | 159 echo "--target-arch=value target CPU architecture (arm=default, x86)" >& 2 |
| 160 echo "--try-32bit-host try building a 32-bit host architecture" >&2 |
160 echo "--help this help" >& 2 | 161 echo "--help this help" >& 2 |
161 } | 162 } |
162 | 163 |
163 ################################################################################ | 164 ################################################################################ |
164 # Process command line options. | 165 # Process command line options. |
165 # --target-arch= Specifices target CPU architecture. Currently supported | 166 # --target-arch= Specifices target CPU architecture. Currently supported |
166 # architectures are "arm" (default), and "x86". | 167 # architectures are "arm" (default), and "x86". |
167 # --help Prints out help message. | 168 # --help Prints out help message. |
168 ################################################################################ | 169 ################################################################################ |
169 process_options() { | 170 process_options() { |
| 171 try_32bit_host_build= |
170 while [[ $1 ]]; do | 172 while [[ $1 ]]; do |
171 case "$1" in | 173 case "$1" in |
172 --target-arch=*) | 174 --target-arch=*) |
173 target_arch="$(echo "$1" | sed 's/^[^=]*=//')" | 175 target_arch="$(echo "$1" | sed 's/^[^=]*=//')" |
174 ;; | 176 ;; |
| 177 --try-32bit-host) |
| 178 try_32bit_host_build=true |
| 179 ;; |
175 --help) | 180 --help) |
176 print_usage | 181 print_usage |
177 return 1 | 182 return 1 |
178 ;; | 183 ;; |
179 *) | 184 *) |
180 # Ignore other command line options | 185 # Ignore other command line options |
181 echo "Unknown option: $1" | 186 echo "Unknown option: $1" |
182 ;; | 187 ;; |
183 esac | 188 esac |
184 shift | 189 shift |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 export GYP_DEFINES="${DEFINES}" | 307 export GYP_DEFINES="${DEFINES}" |
303 | 308 |
304 export GYP_GENERATORS="android" | 309 export GYP_GENERATORS="android" |
305 | 310 |
306 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 311 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
307 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 312 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
308 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" | 313 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" |
309 | 314 |
310 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" | 315 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" |
311 } | 316 } |
OLD | NEW |