From: Stuart Hastings Date: Thu, 16 Jul 2009 16:49:11 +0000 (+0000) Subject: In an Apple-style build, compile with llvm-gcc/llvm-g++ if available. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=021da14dac8d3841c47ad742f84f2f1dc96448f6;p=oota-llvm.git In an Apple-style build, compile with llvm-gcc/llvm-g++ if available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76080 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/buildit/build_llvm b/utils/buildit/build_llvm index eac68b4f572..e574ff76ca4 100755 --- a/utils/buildit/build_llvm +++ b/utils/buildit/build_llvm @@ -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"