From d65255675854b4d2bd367549a423988bf8ddc5e5 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 15 Feb 2022 20:00:14 -0800 Subject: [PATCH] separateDebugInfo: Use --strip-unneeded MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to https://stackoverflow.com/q/46197810/115030, --only-keep-debug preserves all the information stripped by --strip-unneeded. This reduces the size of the webkitgtk output by 22% (123 MB → 96 MB). Inspired by #159612. Signed-off-by: Anders Kaseorg --- pkgs/build-support/setup-hooks/separate-debug-info.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/setup-hooks/separate-debug-info.sh b/pkgs/build-support/setup-hooks/separate-debug-info.sh index 1a23e6b198ee..d910bce11af0 100644 --- a/pkgs/build-support/setup-hooks/separate-debug-info.sh +++ b/pkgs/build-support/setup-hooks/separate-debug-info.sh @@ -34,7 +34,7 @@ _separateDebugInfo() { # firmware blobs in QEMU.) ( $OBJCOPY --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug" - $STRIP --strip-debug "$i" + $STRIP --strip-unneeded "$i" # Also a create a symlink .debug. ln -sfn ".build-id/${id:0:2}/${id:2}.debug" "$dst/../$(basename "$i")"