Only run tests in test/CodeGen/CBackend/X86 when both X86 and CBackend are supported
[oota-llvm.git] / utils / buildit / build_llvm
index 3aa55884a987842234ecb452a2dfa79f772dfbe0..d52c47535686734b7fda55b7501ea96aaab567c8 100755 (executable)
@@ -97,31 +97,16 @@ if [ "$ARM_HOSTED_BUILD" = yes ]; then
     echo 'exec '$T' "$@"' >> $P || exit 1
     chmod a+x $P || exit 1
   done
-  # Try to use the platform llvm-gcc. Fall back to gcc if it's not available.
-  for prog in gcc g++ ; do
+  # Set up the links for clang.
+  for prog in clang clang++ ; do
     P=$DIR/bin/arm-apple-darwin$DARWIN_VERS-${prog}
-    T=`xcrun -sdk $SDKROOT -find llvm-${prog}`
-    if [ "x$T" = "x" ] ; then
-      T=`xcrun -sdk $SDKROOT -find ${prog}`
-    fi
+    T=`xcrun -sdk $SDKROOT -find ${prog}`
     echo '#!/bin/sh' > $P || exit 1
     echo 'exec '$T' -arch armv7 -isysroot '${SDKROOT}' "$@"' >> $P || exit 1
     chmod a+x $P || exit 1
   done
 
   PATH=$DIR/bin:$PATH
-# otherwise, try to use llvm-gcc if it's available
-elif [ $DARWIN_VERS -gt 9 ]; then
-  # 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="/Developer/usr/bin:$PATH"
-  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
-  PATH=$savedPATH
-  unset XTMPCC savedPATH
 fi
 
 if [ "$ARM_HOSTED_BUILD" = yes ]; then
@@ -132,7 +117,7 @@ elif [ "$IOS_SIM_BUILD" = yes ]; then
   configure_opts="--enable-targets=x86 --host=i686-apple-darwin_sim \
                   --build=i686-apple-darwin10"
 else
-  configure_opts="--enable-targets=arm,x86,powerpc,cbe"
+  configure_opts="--enable-targets=arm,x86,cbe"
 fi
 
 if [ \! -f Makefile.config ]; then
@@ -261,14 +246,15 @@ elif [ $MACOSX_DEPLOYMENT_TARGET = "10.5" ]; then
         -exec lipo -extract ppc7400 -extract i386 {} -output {} \;
 else
     find . -perm 755 -type f \! \( -name '*gccas' -o -name '*gccld' -o -name llvm-config \) \
-        -exec lipo -extract ppc7400 -extract i386 -extract x86_64 {} -output {} \;
+        -exec lipo -extract i386 -extract x86_64 {} -output {} \;
 fi
 
 # The Hello dylib is an example of how to build a pass.
 # The BugpointPasses module is only used to test bugpoint.
 # These unversioned dylibs cause verification failures, so do not install them.
-rm $DEST_DIR$DEST_ROOT/lib/libLLVMHello.dylib
-rm $DEST_DIR$DEST_ROOT/lib/libBugpointPasses.dylib
+# (The wildcards are used to match a "lib" prefix if it is present.)
+rm $DEST_DIR$DEST_ROOT/lib/*LLVMHello.dylib
+rm $DEST_DIR$DEST_ROOT/lib/*BugpointPasses.dylib
 
 # Compress manpages
 MDIR=$DEST_DIR$DEST_ROOT/share/man/man1
@@ -341,7 +327,7 @@ else
 fi
 rm -f lib/libLTO.a lib/libLTO.la
 
-// Omit lto.h from the result.  Clang will supply.
+# Omit lto.h from the result.  Clang will supply.
 find $DEST_DIR$DEST_ROOT -name lto.h -delete
 
 ################################################################################