Move the number of cpus logic to somewhere more logical.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113393 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands 2010-09-08 19:50:25 +00:00
parent f2605419ea
commit d357d747de

View File

@ -23,15 +23,6 @@ do_fortran="yes"
do_64bit="yes"
BuildDir="`pwd`"
# Figure out how many make processes to run.
NumJobs=`sysctl -n hw.activecpu 2> /dev/null || true`
if [ -z "$NumJobs" ]; then
NumJobs=`sysctl -n hw.ncpu 2> /dev/null || true`
fi
if [ -z "$NumJobs" ]; then
NumJobs=`grep -c processor /proc/cpuinfo 2> /dev/null || true`
fi
function usage() {
echo "usage: `basename $0` -release X.Y -rc NUM [OPTIONS]"
echo ""
@ -104,6 +95,16 @@ if [ -z "$RC" ]; then
exit 1
fi
# Figure out how many make processes to run.
if [ -z "$NumJobs" ]; then
NumJobs=`sysctl -n hw.activecpu 2> /dev/null || true`
fi
if [ -z "$NumJobs" ]; then
NumJobs=`sysctl -n hw.ncpu 2> /dev/null || true`
fi
if [ -z "$NumJobs" ]; then
NumJobs=`grep -c processor /proc/cpuinfo 2> /dev/null || true`
fi
if [ -z "$NumJobs" ]; then
NumJobs=3
fi