diff options
author | Bill Wendling <isanbard@gmail.com> | 2007-11-12 23:55:19 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2007-11-12 23:55:19 +0000 |
commit | 553d22c29e74f58c15df32f7e5d38bf13b7f2e92 (patch) | |
tree | 0046d35bf3abde2e781a22faf7068628be380ba6 /utils | |
parent | 5250f1f4b0720f0fb7c01fc8340ada94ba3531aa (diff) | |
download | llvm-553d22c29e74f58c15df32f7e5d38bf13b7f2e92.tar.gz llvm-553d22c29e74f58c15df32f7e5d38bf13b7f2e92.tar.bz2 llvm-553d22c29e74f58c15df32f7e5d38bf13b7f2e92.tar.xz |
Move SYSCTL stuff close to where it's used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44031 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/buildit/build_llvm | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/utils/buildit/build_llvm b/utils/buildit/build_llvm index 9ce57696ca..56d8fc82be 100755 --- a/utils/buildit/build_llvm +++ b/utils/buildit/build_llvm @@ -106,21 +106,6 @@ if ! test $? == 0 ; then exit 1 fi -# Figure out how many make processes to run. -SYSCTL=`sysctl -n hw.activecpu` - -# hw.activecpu only available in 10.2.6 and later -if [ -z "$SYSCTL" ]; then - SYSCTL=`sysctl -n hw.ncpu` -fi - -# sysctl -n hw.* does not work when invoked via B&I chroot /BuildRoot. Builders -# can default to 2, since even if they are single processor, nothing else is -# running on the machine. -if [ -z "$SYSCTL" ]; then - SYSCTL=2 -fi - ################################################################################ # Construct the actual destination root, by copying stuff from $DIR/dst-* to # $DEST_DIR, with occasional 'lipo' commands. @@ -184,6 +169,21 @@ lipo -extract ppc -extract i386 lib/LLVMlto.0.0.0.so -output lib/LLVMlto.0.0.0.s ################################################################################ # Create SYM_DIR with information required for debugging. +# Figure out how many make processes to run. +SYSCTL=`sysctl -n hw.activecpu` + +# hw.activecpu only available in 10.2.6 and later +if [ -z "$SYSCTL" ]; then + SYSCTL=`sysctl -n hw.ncpu` +fi + +# sysctl -n hw.* does not work when invoked via B&I chroot /BuildRoot. Builders +# can default to 2, since even if they are single processor, nothing else is +# running on the machine. +if [ -z "$SYSCTL" ]; then + SYSCTL=2 +fi + cd $SYM_DIR || exit 1 # Clean out SYM_DIR in case -noclean was passed to buildit. |