| 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"
|
|
|