Skip to content

Commit

Permalink
setup-hooks/strip: more robust stripping
Browse files Browse the repository at this point in the history
Use "find -exec" to strip rather than "find … | xargs …". The former
ensures that stripping is attempted for each file, whereas the latter
will stop stripping at the first failure. Unstripped files can fool
runtime dependency detection and bloat closure sizes.
  • Loading branch information
ehmry authored and FRidh committed Dec 8, 2020
1 parent 46b8c00 commit e4d17dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/build-support/setup-hooks/strip.sh
Expand Up @@ -51,7 +51,7 @@ stripDirs() {

if [ -n "${dirs}" ]; then
header "stripping (with command $cmd and flags $stripFlags) in$dirs"
find $dirs -type f -print0 | xargs -0 ${xargsFlags:--r} $cmd $commonStripFlags $stripFlags 2>/dev/null || true
find $dirs -type f -exec $cmd $commonStripFlags $stripFlags '{}' \; #
stopNest
fi
}

0 comments on commit e4d17dc

Please sign in to comment.