mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 14:11:36 +00:00
setup-hooks/strip: more robust stripping
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.
This commit is contained in:
parent
46b8c00d0d
commit
e4d17dc558
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue