X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2Fbuildit%2Fbuild_llvm;h=015b7ad765c4f9d70adea5c74e84f4e47cd3900f;hb=f45a82890e34984ad1e1e259f8fb902caddfb0b1;hp=09baca09ec3488e9d5fc408c68e9c22d0e4998d7;hpb=e649778b555465fd25811daef98f6ddbc9efd378;p=oota-llvm.git diff --git a/utils/buildit/build_llvm b/utils/buildit/build_llvm index 09baca09ec3..015b7ad765c 100755 --- a/utils/buildit/build_llvm +++ b/utils/buildit/build_llvm @@ -82,7 +82,7 @@ mkdir -p $DIR/obj-llvm || exit 1 cd $DIR/obj-llvm || exit 1 if [ \! -f Makefile.config ]; then - $SRC_DIR/llvm/configure --prefix=$DT_HOME/local \ + $SRC_DIR/configure --prefix=$DT_HOME/local \ --enable-targets=arm,x86,powerpc,cbe \ --enable-assertions=$LLVM_ASSERTIONS \ --enable-optimized=$LLVM_OPTIMIZED \ @@ -176,26 +176,35 @@ echo "#define LLVM_MINOR_VERSION ${RC_ProjectSourceSubversion}" >> $DEST_DIR$DES if [ "x$LLVM_DEBUG" != "x1" ]; then # Strip local symbols from llvm libraries. strip -S $DEST_DIR$DEST_ROOT/lib/*.[oa] - strip -Sx $DEST_DIR$DEST_ROOT/lib/*.so + for f in `ls $DEST_DIR$DEST_ROOT/lib/*.so`; do + strip -Sx $f + done fi +# Copy over the tblgen utility. +cp `find $DIR -name tblgen` $DT_HOME/local/bin + # Remove .dir files cd $DEST_DIR$DEST_ROOT -rm bin/.dir etc/llvm/.dir lib/.dir +rm -f bin/.dir etc/llvm/.dir lib/.dir # Remove PPC64 fat slices. cd $DEST_DIR$DEST_ROOT/bin if [ $MACOSX_DEPLOYMENT_TARGET = "10.4" ]; then - find . -perm 755 -type f -exec lipo -extract ppc -extract i386 {} -output {} \; + find . -perm 755 -type f \! \( -name '*gccas' -o -name '*gccld' -o -name llvm-config \) \ + -exec lipo -extract ppc -extract i386 {} -output {} \; elif [ $MACOSX_DEPLOYMENT_TARGET = "10.5" ]; then - find . -perm 755 -type f -exec lipo -extract ppc7400 -extract i386 {} -output {} \; + find . -perm 755 -type f \! \( -name '*gccas' -o -name '*gccld' -o -name llvm-config \) \ + -exec lipo -extract ppc7400 -extract i386 {} -output {} \; else - find . -perm 755 -type f -exec lipo -extract ppc7400 -extract i386 -extract x86_64 {} -output {} \; + find . -perm 755 -type f \! \( -name '*gccas' -o -name '*gccld' -o -name llvm-config \) \ + -exec lipo -extract ppc7400 -extract i386 -extract x86_64 {} -output {} \; fi cd $DEST_DIR$DEST_ROOT mkdir -p $DT_HOME/lib mv lib/libLTO.dylib $DT_HOME/lib/libLTO.dylib +strip -S $DT_HOME/lib/libLTO.dylib rm -f lib/libLTO.a lib/libLTO.la # Compress manpages