From e4d17dc558f61f8565df025fa46de7035c4a1d93 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Wed, 25 Nov 2020 17:27:31 +0100 Subject: [PATCH] setup-hooks/strip: more robust stripping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- pkgs/build-support/setup-hooks/strip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/setup-hooks/strip.sh b/pkgs/build-support/setup-hooks/strip.sh index f5fa9378fd7e..a7cdfd1d2767 100644 --- a/pkgs/build-support/setup-hooks/strip.sh +++ b/pkgs/build-support/setup-hooks/strip.sh @@ -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 }