diff --git a/llvm/utils/buildit/build_llvm b/llvm/utils/buildit/build_llvm index 8d8c755b6091..91fbe15be473 100755 --- a/llvm/utils/buildit/build_llvm +++ b/llvm/utils/buildit/build_llvm @@ -90,11 +90,13 @@ cd $DIR/obj-llvm || exit 1 # If the user has set CC or CXX, respect their wishes. If not, # compile with LLVM-GCC/LLVM-G++ if available; if LLVM is not # available, fall back to usual GCC/G++ default. +savedPATH=$PATH ; PATH="$PATH:/Developer/usr/bin" XTMPCC=$(which llvm-gcc) if [ x$CC = x -a x$XTMPCC != x ] ; then export CC=$XTMPCC ; fi XTMPCC=$(which llvm-g++) if [ x$CXX = x -a x$XTMPCC != x ] ; then export CXX=$XTMPCC ; fi -unset XTMPCC +PATH=$savedPATH +unset XTMPCC savedPATH if [ \! -f Makefile.config ]; then $SRC_DIR/configure --prefix=$DT_HOME/local \