In an Apple-style build, compile with llvm-gcc/llvm-g++ if available.
authorStuart Hastings <stuart@apple.com>
Thu, 16 Jul 2009 16:49:11 +0000 (16:49 +0000)
committerStuart Hastings <stuart@apple.com>
Thu, 16 Jul 2009 16:49:11 +0000 (16:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76080 91177308-0d34-0410-b5e6-96231b3b80d8

utils/buildit/build_llvm

index eac68b4f572fa73879c3a4e8ac0a9b27eb4ac2cb..e574ff76ca464c7ccedfced719e37fc6c99a0aa5 100755 (executable)
@@ -56,8 +56,11 @@ DIR=`pwd`
 DARWIN_VERS=`uname -r | sed 's/\..*//'`
 echo DARWIN_VERS = $DARWIN_VERS
 
-# If the user has CC set in their environment unset it now
-unset CC
+# If we can find an LLVM-GCC, prefer it.
+export CC=/Developer/usr/bin/llvm-gcc
+if [ ! -x $CC ] ; then unset CC ; fi
+export CXX=/Developer/usr/bin/llvm-g++
+if [ ! -x $CXX ] ; then unset CXX ; fi
 
 DT_HOME=$DEST_DIR/Developer/usr
 DEST_ROOT="/Developer$DEST_ROOT"