From 0a7e18cb23292d8892ac15fbbf0d5420be87e2a5 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 29 Jun 2010 22:17:37 +0000 Subject: Use -l option to remove symbols from i386. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107212 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/buildit/build_llvm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'utils') diff --git a/utils/buildit/build_llvm b/utils/buildit/build_llvm index 0c64439078..b4667551ff 100755 --- a/utils/buildit/build_llvm +++ b/utils/buildit/build_llvm @@ -244,9 +244,12 @@ 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] + # + # Use '-l' to strip i386 modules. N.B. that flag doesn't work with kext or + # PPC objects! + strip -Sl $DEST_DIR$DEST_ROOT/lib/*.[oa] for f in `ls $DEST_DIR$DEST_ROOT/lib/*.so`; do - strip -Sx $f + strip -Sxl $f done fi @@ -323,7 +326,10 @@ cd $DEST_DIR$DEST_ROOT if [ "$INSTALL_LIBLTO" = "yes" ]; then mkdir -p $DT_HOME/lib mv lib/libLTO.dylib $DT_HOME/lib/libLTO.dylib - strip -S $DT_HOME/lib/libLTO.dylib + + # Use '-l' to strip i386 modules. N.B. that flag doesn't work with kext or + # PPC objects! + strip -arch all -Sl $DT_HOME/lib/libLTO.dylib fi rm -f lib/libLTO.a lib/libLTO.la @@ -336,9 +342,12 @@ find $DEST_DIR -name \*.a -print | xargs ranlib || exit 1 find $DEST_DIR -name \*.dSYM -print | xargs rm -r || exit 1 # Strip debugging information from files +# +# Use '-l' to strip i386 modules. N.B. that flag doesn't work with kext or +# PPC objects! 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} strip -S + -print | xargs -n 1 -P ${SYSCTL} strip -arch all -Sl chgrp -h -R wheel $DEST_DIR chgrp -R wheel $DEST_DIR -- cgit v1.2.3