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

Side by Side Diff: build/android/envsetup_functions.sh

Issue 12317098: Android: allow host OS to be passed to envsetup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update usage Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « build/android/envsetup.sh ('k') | 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 (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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" 151 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp"
152 } 152 }
153 153
154 154
155 ################################################################################ 155 ################################################################################
156 # Prints out help message on usage. 156 # Prints out help message on usage.
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 "--host-os=value override host OS detection (linux, mac)" >&2
161 echo "--try-32bit-host try building a 32-bit host architecture" >&2 162 echo "--try-32bit-host try building a 32-bit host architecture" >&2
162 echo "--help this help" >& 2 163 echo "--help this help" >& 2
163 } 164 }
164 165
165 ################################################################################ 166 ################################################################################
166 # Process command line options. 167 # Process command line options.
167 # --target-arch= Specifices target CPU architecture. Currently supported 168 # --target-arch= Specifices target CPU architecture. Currently supported
168 # architectures are "arm" (default), and "x86". 169 # architectures are "arm" (default), and "x86".
169 # --help Prints out help message. 170 # --help Prints out help message.
170 ################################################################################ 171 ################################################################################
171 process_options() { 172 process_options() {
173 host_os=$(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')
172 try_32bit_host_build= 174 try_32bit_host_build=
173 while [[ $1 ]]; do 175 while [[ $1 ]]; do
174 case "$1" in 176 case "$1" in
175 --target-arch=*) 177 --target-arch=*)
176 target_arch="$(echo "$1" | sed 's/^[^=]*=//')" 178 target_arch="$(echo "$1" | sed 's/^[^=]*=//')"
177 ;; 179 ;;
180 --host-os=*)
181 host_os="$(echo "$1" | sed 's/^[^=]*=//')"
182 ;;
178 --try-32bit-host) 183 --try-32bit-host)
179 try_32bit_host_build=true 184 try_32bit_host_build=true
180 ;; 185 ;;
181 --help) 186 --help)
182 print_usage 187 print_usage
183 return 1 188 return 1
184 ;; 189 ;;
185 *) 190 *)
186 # Ignore other command line options 191 # Ignore other command line options
187 echo "Unknown option: $1" 192 echo "Unknown option: $1"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 export GYP_DEFINES="${DEFINES}" 284 export GYP_DEFINES="${DEFINES}"
280 285
281 export GYP_GENERATORS="android" 286 export GYP_GENERATORS="android"
282 287
283 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" 288 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All"
284 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" 289 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1"
285 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" 290 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0"
286 291
287 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" 292 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp"
288 } 293 }
OLDNEW
« no previous file with comments | « build/android/envsetup.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698