Chromium Code Reviews| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 ################################################################################ | 157 ################################################################################ |
| 158 print_usage() { | 158 print_usage() { |
| 159 echo "usage: ${0##*/} [--target-arch=value] [--help]" >& 2 | 159 echo "usage: ${0##*/} [--target-arch=value] [--help]" >& 2 |
| 160 echo "--target-arch=value target CPU architecture (arm=default, x86)" >& 2 | 160 echo "--target-arch=value target CPU architecture (arm=default, x86)" >& 2 |
| 161 echo "--try-32bit-host try building a 32-bit host architecture" >&2 | 161 echo "--try-32bit-host try building a 32-bit host architecture" >&2 |
| 162 echo "--help this help" >& 2 | 162 echo "--help this help" >& 2 |
| 163 } | 163 } |
| 164 | 164 |
| 165 ################################################################################ | 165 ################################################################################ |
| 166 # Process command line options. | 166 # Process command line options. |
| 167 # --target-arch= Specifices target CPU architecture. Currently supported | 167 # --target-arch= Specifices target CPU architecture. Currently supported |
|
Yaron
2013/02/25 16:32:44
add option here.
| |
| 168 # architectures are "arm" (default), and "x86". | 168 # architectures are "arm" (default), and "x86". |
| 169 # --help Prints out help message. | 169 # --help Prints out help message. |
| 170 ################################################################################ | 170 ################################################################################ |
| 171 process_options() { | 171 process_options() { |
| 172 host_os=$(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/') | |
| 172 try_32bit_host_build= | 173 try_32bit_host_build= |
| 173 while [[ $1 ]]; do | 174 while [[ $1 ]]; do |
| 174 case "$1" in | 175 case "$1" in |
| 175 --target-arch=*) | 176 --target-arch=*) |
| 176 target_arch="$(echo "$1" | sed 's/^[^=]*=//')" | 177 target_arch="$(echo "$1" | sed 's/^[^=]*=//')" |
| 177 ;; | 178 ;; |
| 179 --host-os=*) | |
| 180 host_os="$(echo "$1" | sed 's/^[^=]*=//')" | |
| 181 ;; | |
| 178 --try-32bit-host) | 182 --try-32bit-host) |
| 179 try_32bit_host_build=true | 183 try_32bit_host_build=true |
| 180 ;; | 184 ;; |
| 181 --help) | 185 --help) |
| 182 print_usage | 186 print_usage |
| 183 return 1 | 187 return 1 |
| 184 ;; | 188 ;; |
| 185 *) | 189 *) |
| 186 # Ignore other command line options | 190 # Ignore other command line options |
| 187 echo "Unknown option: $1" | 191 echo "Unknown option: $1" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 279 export GYP_DEFINES="${DEFINES}" | 283 export GYP_DEFINES="${DEFINES}" |
| 280 | 284 |
| 281 export GYP_GENERATORS="android" | 285 export GYP_GENERATORS="android" |
| 282 | 286 |
| 283 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 287 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
| 284 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 288 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
| 285 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" | 289 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" |
| 286 | 290 |
| 287 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" | 291 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" |
| 288 } | 292 } |
| OLD | NEW |