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

Unified Diff: src/scripts/build_chrome.sh

Issue 425012: Turn NUM_JOBS into an overridable flag for distcc builds. (Closed)
Patch Set: Whoops! Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/build_chrome.sh
diff --git a/src/scripts/build_chrome.sh b/src/scripts/build_chrome.sh
index a482d2945e09ee5fa186a067a471c0fe442a0f8a..d693edc0dee67399a8b95a0350550b28c3cfeb8a 100755
--- a/src/scripts/build_chrome.sh
+++ b/src/scripts/build_chrome.sh
@@ -18,11 +18,17 @@ assert_outside_chroot
# setting CHROMEOS_CHROME_DIR (for example, in ./.chromeos_dev)
DEFAULT_CHROME_DIR="${CHROMEOS_CHROME_DIR:-/home/$USER/chrome}"
+# The number of jobs to pass to tools that can run in parallel (such as make
+# and dpkg-buildpackage
+NUM_JOBS=`cat /proc/cpuinfo | grep processor | awk '{a++} END {print a}'`
+
# Flags
DEFINE_string chrome_dir "$DEFAULT_CHROME_DIR" \
"Directory to Chrome source"
DEFINE_string mode "Release" \
"The mode to build Chrome in (Debug or Release)"
+DEFINE_string num_jobs "$NUM_JOBS" \
+ "The number of jobs to run in parallel"
# Parse command line
FLAGS "$@" || exit 1
@@ -37,15 +43,12 @@ FLAGS_chrome_dir=`eval readlink -f $FLAGS_chrome_dir`
# Build Chrome
echo Building Chrome in mode $FLAGS_mode
-# The number of jobs to pass to tools that can run in parallel (such as make
-# and dpkg-buildpackage
-NUM_JOBS=`cat /proc/cpuinfo | grep processor | awk '{a++} END {print a}'`
export GYP_GENERATORS="make"
export GYP_DEFINES="chromeos=1 target_arch=ia32"
CHROME_DIR=$FLAGS_chrome_dir
cd "$CHROME_DIR/src"
gclient runhooks --force
-make BUILDTYPE=$FLAGS_mode -j$NUM_JOBS -r chrome
+make BUILDTYPE=$FLAGS_mode -j$FLAGS_num_jobs -r chrome
# Zip into chrome-chromeos.zip and put in local_assets
BUILD_DIR="$CHROME_DIR/src/out"
« 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