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

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

Issue 22976005: Android: Set GOMA_COMPILER_PROXY_THREADS to a reasonable value (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« 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 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Sets up environment for building Chromium on Android. It can either be 6 # Sets up environment for building Chromium on Android. It can either be
7 # compiled with the Android tree or using the Android SDK/NDK. To build with 7 # compiled with the Android tree or using the Android SDK/NDK. To build with
8 # NDK/SDK: ". build/android/envsetup.sh". Environment variable 8 # NDK/SDK: ". build/android/envsetup.sh". Environment variable
9 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to 9 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to
10 # specifiy build type. 10 # specifiy build type.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 -fno-omit-frame-pointer -fno-builtin' release_valgrind_build=1\ 136 -fno-omit-frame-pointer -fno-builtin' release_valgrind_build=1\
137 release_optimize=1" 137 release_optimize=1"
138 fi 138 fi
139 139
140 # Source a bunch of helper functions 140 # Source a bunch of helper functions
141 . ${CHROME_SRC}/build/android/adb_device_functions.sh 141 . ${CHROME_SRC}/build/android/adb_device_functions.sh
142 142
143 ANDROID_GOMA_WRAPPER="" 143 ANDROID_GOMA_WRAPPER=""
144 if [[ -d $GOMA_DIR ]]; then 144 if [[ -d $GOMA_DIR ]]; then
145 ANDROID_GOMA_WRAPPER="$GOMA_DIR/gomacc" 145 ANDROID_GOMA_WRAPPER="$GOMA_DIR/gomacc"
146 num_cores="$(grep --count ^processor /proc/cpuinfo)"
147 # Goma is IO-ish you want more threads than you have cores.
148 let goma_threads=num_cores*2
149 if [ -z "${GOMA_COMPILER_PROXY_THREADS}" -a "${goma_threads}" -gt 16 ]; then
150 # The default is 16 threads, if the machine has many cores we crank it up a bit
151 GOMA_COMPILER_PROXY_THREADS="${goma_threads}"
152 export GOMA_COMPILER_PROXY_THREADS
153 fi
146 fi 154 fi
147 export ANDROID_GOMA_WRAPPER 155 export ANDROID_GOMA_WRAPPER
148 156
149 # Declare Android are cross compile. 157 # Declare Android are cross compile.
150 export GYP_CROSSCOMPILE=1 158 export GYP_CROSSCOMPILE=1
151 159
152 # Performs a gyp_chromium run to convert gyp->Makefile for android code. 160 # Performs a gyp_chromium run to convert gyp->Makefile for android code.
153 android_gyp() { 161 android_gyp() {
154 # This is just a simple wrapper of gyp_chromium, please don't add anything 162 # This is just a simple wrapper of gyp_chromium, please don't add anything
155 # in this function. 163 # in this function.
156 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" 164 echo "GYP_GENERATORS set to '$GYP_GENERATORS'"
157 ( 165 (
158 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" 166 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@"
159 ) 167 )
160 } 168 }
161 169
162 # FLOCK needs to be null on system that has no flock 170 # FLOCK needs to be null on system that has no flock
163 which flock > /dev/null || export FLOCK= 171 which flock > /dev/null || export FLOCK=
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