[llvm-commits] [llvm-gcc-4.2] r147174 - /llvm-gcc-4.2/trunk/build_gcc

Bob Wilson bob.wilson at apple.com
Thu Dec 22 12:39:37 PST 2011


Author: bwilson
Date: Thu Dec 22 14:39:37 2011
New Revision: 147174

URL: http://llvm.org/viewvc/llvm-project?rev=147174&view=rev
Log:
Use xcrun to find clang, instead of hardcoded /Developer/usr/bin path.

Modified:
    llvm-gcc-4.2/trunk/build_gcc

Modified: llvm-gcc-4.2/trunk/build_gcc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/build_gcc?rev=147174&r1=147173&r2=147174&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/build_gcc (original)
+++ llvm-gcc-4.2/trunk/build_gcc Thu Dec 22 14:39:37 2011
@@ -280,13 +280,11 @@
 # If the user has set CC or CXX, respect their wishes.  If not,
 # compile with clang/clang++ if available; if LLVM is not
 # available, fall back to usual GCC/G++ default.
-savedPATH=$PATH ; PATH="/Developer/usr/bin:$PATH"
-XTMPCC=$(which clang)
+XTMPCC=`xcrun -find clang`
 if [ x$CC  = x -a x$XTMPCC != x ] ; then export CC=$XTMPCC  forcedCC=1  ; fi
-XTMPCC=$(which clang++)
+XTMPCC=`xcrun -find clang++`
 if [ x$CXX = x -a x$XTMPCC != x ] ; then export CXX=$XTMPCC forcedCXX=1 ; fi
-PATH=$savedPATH
-unset XTMPCC savedPATH
+unset XTMPCC
 
 # Build the native GCC.  Do this even if the user didn't ask for it
 # because it'll be needed for the bootstrap.





More information about the llvm-commits mailing list