diff options
author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2023-03-04 00:43:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-04 00:43:26 +0000 |
commit | 5aeab348452325694f73f544b70fc56f344825fe (patch) | |
tree | 51078dde33d6040706b43d342ad8a584edc375a0 /pkgs/applications/networking/browsers/firefox/common.nix | |
parent | eedbf71d0df33d54e76f87469b82e4feb1737c2e (diff) | |
parent | 45e58731b8ad48d4ffc5c0086e98f4ab942efce1 (diff) |
Merge pull request #218301 from rrbutani/fix/separate-debuginfo-with-lld
Fix `separate-debug-info` with lld
Diffstat (limited to 'pkgs/applications/networking/browsers/firefox/common.nix')
-rw-r--r-- | pkgs/applications/networking/browsers/firefox/common.nix | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 8c8fca65c66d..55dca4661ee7 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -497,41 +497,6 @@ buildStdenv.mkDerivation ({ gappsWrapperArgs+=(--argv0 "$out/bin/.${binaryName}-wrapped") ''; - # Workaround: The separateDebugInfo hook skips artifacts whose build ID's length is not 40. - # But we got 16-length build ID here. The function body is mainly copied from pkgs/build-support/setup-hooks/separate-debug-info.sh - # Remove it when https://github.com/NixOS/nixpkgs/pull/146275 is merged. - preFixup = lib.optionalString enableDebugSymbols '' - _separateDebugInfo() { - [ -e "$prefix" ] || return 0 - - local dst="''${debug:-$out}" - if [ "$prefix" = "$dst" ]; then return 0; fi - - dst="$dst/lib/debug/.build-id" - - # Find executables and dynamic libraries. - local i - while IFS= read -r -d $'\0' i; do - if ! isELF "$i"; then continue; fi - - # Extract the Build ID. FIXME: there's probably a cleaner way. - local id="$($READELF -n "$i" | sed 's/.*Build ID: \([0-9a-f]*\).*/\1/; t; d')" - if [[ -z "$id" ]]; then - echo "could not find build ID of $i, skipping" >&2 - continue - fi - - # Extract the debug info. - echo "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" - - # Also a create a symlink <original-name>.debug. - ln -sfn ".build-id/''${id:0:2}/''${id:2}.debug" "$dst/../$(basename "$i")" - done < <(find "$prefix" -type f -print0) - } - ''; - postFixup = lib.optionalString crashreporterSupport '' patchelf --add-rpath "${lib.makeLibraryPath [ curl ]}" $out/lib/${binaryName}/crashreporter ''; |