Skip to content

Commit

Permalink
separateDebugInfo: Use --strip-unneeded
Browse files Browse the repository at this point in the history
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 <andersk@mit.edu>
  • Loading branch information
andersk committed Feb 17, 2022
1 parent 4bb7792 commit d652556
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/build-support/setup-hooks/separate-debug-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <original-name>.debug.
ln -sfn ".build-id/${id:0:2}/${id:2}.debug" "$dst/../$(basename "$i")"
Expand Down

0 comments on commit d652556

Please sign in to comment.