Author: void Date: Mon Nov 12 17:55:19 2007 New Revision: 44031 URL: http://llvm.org/viewvc/llvm-project?rev=44031&view=rev Log: Move SYSCTL stuff close to where it's used.
Modified: llvm/trunk/utils/buildit/build_llvm Modified: llvm/trunk/utils/buildit/build_llvm URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/build_llvm?rev=44031&r1=44030&r2=44031&view=diff ============================================================================== --- llvm/trunk/utils/buildit/build_llvm (original) +++ llvm/trunk/utils/buildit/build_llvm Mon Nov 12 17:55:19 2007 @@ -106,21 +106,6 @@ 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 @@ ################################################################################ # 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. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits