[llvm-branch-commits] [llvm-branch] r72080 - /llvm/branches/Apple/Xcode-3.1.1/utils/buildit/build_llvm
Evan Cheng
evan.cheng at apple.com
Mon May 18 17:29:49 PDT 2009
Author: evancheng
Date: Mon May 18 19:29:48 2009
New Revision: 72080
URL: http://llvm.org/viewvc/llvm-project?rev=72080&view=rev
Log:
Makefile changes to get this version of llvmgcc42 built on SnowLeopard.
Modified:
llvm/branches/Apple/Xcode-3.1.1/utils/buildit/build_llvm
Modified: llvm/branches/Apple/Xcode-3.1.1/utils/buildit/build_llvm
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Xcode-3.1.1/utils/buildit/build_llvm?rev=72080&r1=72079&r2=72080&view=diff
==============================================================================
--- llvm/branches/Apple/Xcode-3.1.1/utils/buildit/build_llvm (original)
+++ llvm/branches/Apple/Xcode-3.1.1/utils/buildit/build_llvm Mon May 18 19:29:48 2009
@@ -82,13 +82,21 @@
cd $DIR/obj-llvm || exit 1
if [ \! -f Makefile.config ]; then
- $SRC_DIR/llvm/configure --prefix=$DT_HOME/local \
- --enable-targets=x86,powerpc,cbe \
+ $SRC_DIR/configure --prefix=$DT_HOME/local \
+ --enable-targets=arm,x86,powerpc,cbe \
--enable-assertions=$LLVM_ASSERTIONS \
--enable-optimized=$LLVM_OPTIMIZED \
|| exit 1
fi
+SUBVERSION=`echo $RC_ProjectSourceVersion | sed -e 's/[^.]*\.\([0-9]*\).*/\1/'`
+
+if [ "x$SUBVERSION" != "x$RC_ProjectSourceVersion" ]; then
+ LLVM_SUBMIT_SUBVERSION=`printf "%02d" $SUBVERSION`
+ RC_ProjectSourceVersion=`echo $RC_ProjectSourceVersion | sed -e 's/\..*//'`
+ LLVM_SUBMIT_VERSION=$RC_ProjectSourceVersion
+fi
+
if [ "x$LLVM_SUBMIT_SUBVERSION" = "x00" -o "x$LLVM_SUBMIT_SUBVERSION" = "x0" ]; then
LLVM_VERSION="$LLVM_SUBMIT_VERSION"
else
@@ -130,7 +138,8 @@
make $JOBS_FLAG $OPTIMIZE_OPTS UNIVERSAL=1 UNIVERSAL_ARCH="$TARGETS" \
LLVM_SUBMIT_VERSION=$LLVM_SUBMIT_VERSION \
LLVM_SUBMIT_SUBVERSION=$LLVM_SUBMIT_SUBVERSION \
- CXXFLAGS="-DLLVM_VERSION_INFO='\" Apple Build #$LLVM_VERSION\"'"
+ CXXFLAGS="-DLLVM_VERSION_INFO='\" Apple Build #$LLVM_VERSION\"'" \
+ VERBOSE=1
if ! test $? == 0 ; then
echo "error: LLVM 'make' failed!"
@@ -149,7 +158,10 @@
cd $DIR/obj-llvm || exit 1
# Install the tree into the destination directory.
-make $LOCAL_MAKEFLAGS $OPTIMIZE_OPTS UNIVERSAL=1 OPTIMIZE_OPTION='-O2' install
+make $LOCAL_MAKEFLAGS $OPTIMIZE_OPTS UNIVERSAL=1 UNIVERSAL_ARCH="$TARGETS" \
+ LLVM_SUBMIT_VERSION=$LLVM_SUBMIT_VERSION \
+ LLVM_SUBMIT_SUBVERSION=$LLVM_SUBMIT_SUBVERSION \
+ OPTIMIZE_OPTION='-O3' VERBOSE=1 install
if ! test $? == 0 ; then
echo "error: LLVM 'make install' failed!"
@@ -164,28 +176,44 @@
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
+# The Hello dylib is an example of how to build a pass. No need to install it.
+rm lib/libLLVMHello.dylib
+
+# Compress manpages
+MDIR=$DEST_DIR$DEST_ROOT/share/man/man1
+gzip -f $MDIR/*
+
################################################################################
# Create SYM_DIR with information required for debugging.
@@ -210,8 +238,9 @@
rm -rf * || exit 1
# Generate .dSYM files
-find $DEST_DIR -perm -0111 -type f ! \( -name '*.la' -o -name gccas -o -name gccld -o -name llvm-config \) -print \
- | xargs -n 1 -P ${SYSCTL} dsymutil
+find $DEST_DIR -perm -0111 -type f \
+ ! \( -name '*.la' -o -name gccas -o -name gccld -o -name llvm-config -o -name '*.a' \) \
+ -print | xargs -n 1 -P ${SYSCTL} dsymutil
# Save .dSYM files and .a archives
cd $DEST_DIR || exit 1
More information about the llvm-branch-commits
mailing list