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
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
-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
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
################################################################################