llvm.org GIT mirror llvm / ae59e8c
Find the strip tool that works with the specified SDKROOT. rdar://10165908 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141013 91177308-0d34-0410-b5e6-96231b3b80d8 Bob Wilson 7 years ago
1 changed file(s) with 10 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
200200 echo "#define LLVM_VERSION ${RC_ProjectSourceVersion}" > $DEST_DIR$DEST_ROOT/include/llvm/Version.h
201201 echo "#define LLVM_MINOR_VERSION ${RC_ProjectSourceSubversion}" >> $DEST_DIR$DEST_ROOT/include/llvm/Version.h
202202
203 # Find the right version of strip to use.
204 STRIP=strip
205 if [ -n "$SDKROOT" ]; then
206 STRIP=`xcrun -sdk $SDKROOT -find strip`
207 fi
208
203209 if [ "x$LLVM_DEBUG" != "x1" ]; then
204210 # Strip local symbols from llvm libraries.
205211 #
206212 # Use '-l' to strip i386 modules. N.B. that flag doesn't work with kext or
207213 # PPC objects!
208 strip -Sl $DEST_DIR$DEST_ROOT/lib/*.[oa]
214 $STRIP -Sl $DEST_DIR$DEST_ROOT/lib/*.[oa]
209215 for f in `ls $DEST_DIR$DEST_ROOT/lib/*.so`; do
210 strip -Sxl $f
216 $STRIP -Sxl $f
211217 done
212218 fi
213219
296302
297303 # Use '-l' to strip i386 modules. N.B. that flag doesn't work with kext or
298304 # PPC objects!
299 strip -arch all -Sl $DT_HOME/lib/libLTO.dylib
305 $STRIP -arch all -Sl $DT_HOME/lib/libLTO.dylib
300306
301307 if [ "x$DISABLE_USR_LINKS" == "x" ]; then
302308 # Add a symlink in /usr/lib for B&I.
326332 # PPC objects!
327333 find $DEST_DIR -perm -0111 -type f \
328334 ! \( -name '*.la' -o -name gccas -o -name gccld -o -name llvm-config \) \
329 -print | xargs -n 1 -P ${SYSCTL} strip -arch all -Sl
335 -print | xargs -n 1 -P ${SYSCTL} $STRIP -arch all -Sl
330336
331337 chgrp -h -R wheel $DEST_DIR
332338 chgrp -R wheel $DEST_DIR