Move the number of cpus logic to somewhere more logical.
authorDuncan Sands <baldrick@free.fr>
Wed, 8 Sep 2010 19:50:25 +0000 (19:50 +0000)
committerDuncan Sands <baldrick@free.fr>
Wed, 8 Sep 2010 19:50:25 +0000 (19:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113393 91177308-0d34-0410-b5e6-96231b3b80d8

utils/release/test-release.sh

index 1832dc43a1204fd47e0d9bfce00aab627b23f36f..89232a319b0d13b6f1a12760c463d5476c42832a 100644 (file)
@@ -23,15 +23,6 @@ do_fortran="yes"
 do_64bit="yes"
 BuildDir="`pwd`"
 
 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 ""
 function usage() {
     echo "usage: `basename $0` -release X.Y -rc NUM [OPTIONS]"
     echo ""
@@ -104,6 +95,16 @@ if [ -z "$RC" ]; then
     exit 1
 fi
 
     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
 if [ -z "$NumJobs" ]; then
     NumJobs=3
 fi