[llvm-commits] [llvm] r141013 - /llvm/trunk/utils/buildit/build_llvm
Bob Wilson
bob.wilson at apple.com
Mon Oct 3 11:48:17 PDT 2011
Author: bwilson
Date: Mon Oct 3 13:48:16 2011
New Revision: 141013
URL: http://llvm.org/viewvc/llvm-project?rev=141013&view=rev
Log:
Find the strip tool that works with the specified SDKROOT. rdar://10165908
Modified:
llvm/trunk/utils/buildit/build_llvm
Modified: llvm/trunk/utils/buildit/build_llvm
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/build_llvm?rev=141013&r1=141012&r2=141013&view=diff
==============================================================================
--- llvm/trunk/utils/buildit/build_llvm (original)
+++ llvm/trunk/utils/buildit/build_llvm Mon Oct 3 13:48:16 2011
@@ -201,14 +201,20 @@
echo "#define LLVM_VERSION ${RC_ProjectSourceVersion}" > $DEST_DIR$DEST_ROOT/include/llvm/Version.h
echo "#define LLVM_MINOR_VERSION ${RC_ProjectSourceSubversion}" >> $DEST_DIR$DEST_ROOT/include/llvm/Version.h
+# Find the right version of strip to use.
+STRIP=strip
+if [ -n "$SDKROOT" ]; then
+ STRIP=`xcrun -sdk $SDKROOT -find strip`
+fi
+
if [ "x$LLVM_DEBUG" != "x1" ]; then
# Strip local symbols from llvm libraries.
#
# 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]
+ $STRIP -Sl $DEST_DIR$DEST_ROOT/lib/*.[oa]
for f in `ls $DEST_DIR$DEST_ROOT/lib/*.so`; do
- strip -Sxl $f
+ $STRIP -Sxl $f
done
fi
@@ -297,7 +303,7 @@
# 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
+ $STRIP -arch all -Sl $DT_HOME/lib/libLTO.dylib
if [ "x$DISABLE_USR_LINKS" == "x" ]; then
# Add a symlink in /usr/lib for B&I.
@@ -327,7 +333,7 @@
# 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 -arch all -Sl
+ -print | xargs -n 1 -P ${SYSCTL} $STRIP -arch all -Sl
chgrp -h -R wheel $DEST_DIR
chgrp -R wheel $DEST_DIR
More information about the llvm-commits
mailing list