forked from mirrors/nixpkgs
separateDebugInfo: compress it by default
Using zlib should be cheap enough and save lots of HDD space. Case study (glib): 11 MB -> 4 MB.
This commit is contained in:
parent
f46fe7b909
commit
b3658bc01b
|
@ -30,7 +30,14 @@ _separateDebugInfo() {
|
|||
# Extract the debug info.
|
||||
header "separating debug info from $i (build ID $id)"
|
||||
mkdir -p "$dst/${id:0:2}"
|
||||
objcopy --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug"
|
||||
objcopy --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug" --compress-debug-sections
|
||||
strip --strip-debug "$i"
|
||||
done
|
||||
}
|
||||
|
||||
# - We might prefer to compress the debug info during link-time already,
|
||||
# but our ld doesn't support --compress-debug-sections=zlib (yet).
|
||||
# - Debug info may cause due to excessive memory usage during linking.
|
||||
# Using -Wa,--compress-debug-sections should help with that;
|
||||
# further interesting information: https://gcc.gnu.org/wiki/DebugFission
|
||||
|
||||
|
|
Loading…
Reference in a new issue