summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 00:14:00 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 00:14:00 +0000
commit706dfa3c45bb30dc8226a03ba7301e88b01b0ce8 (patch)
tree1b479ef1e88eb1a648dee427138698b086aa1545 /tools
parentf8d53df753917aae6452b1d15b07cb497df86c14 (diff)
downloadchromium_src-706dfa3c45bb30dc8226a03ba7301e88b01b0ce8.zip
chromium_src-706dfa3c45bb30dc8226a03ba7301e88b01b0ce8.tar.gz
chromium_src-706dfa3c45bb30dc8226a03ba7301e88b01b0ce8.tar.bz2
clang: Get the number of cores and pass it to make, Mac version.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6604023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76670 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-xtools/clang/scripts/update.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh
index e4abb62..97f391f 100755
--- a/tools/clang/scripts/update.sh
+++ b/tools/clang/scripts/update.sh
@@ -32,11 +32,11 @@ if [ ! -f ./config.status ]; then
../llvm/configure --enable-optimized
fi
-# TODO(thakis): Get the number of cores on Mac too (use |sysctl hw.ncpu| on
-# OS X).
NUM_JOBS=3
if [ $(uname -s) = "Linux" ]; then
NUM_JOBS=$(grep -c "^processor" /proc/cpuinfo)
+elif [ $(uname -s) = "Darwin" ]; then
+ NUM_JOBS=$(sysctl -n hw.ncpu)
fi
make -j$NUM_JOBS
cd -
@@ -53,5 +53,5 @@ rm -rf $PLUGIN_BUILD_DIR
mkdir -p $PLUGIN_BUILD_DIR
cp $PLUGIN_SRC_DIR/Makefile $PLUGIN_BUILD_DIR
cd $PLUGIN_BUILD_DIR
-make -j3
+make -j$NUM_JOBS
cd -