mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 02:05:02 +00:00
separateDebugInfo: pick changes from master
This commit is contained in:
@@ -30,7 +30,15 @@ _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 problems 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
|
||||
# - Another related tool: https://fedoraproject.org/wiki/Features/DwarfCompressor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user