Skip to content

Commit

Permalink
separate-debug-info.sh: succeed when output does not contain elf files
Browse files Browse the repository at this point in the history
Currently, separate-debug-info adds a debug output, and the build fail when it is
not created. the output is only created when at least one elf file is
stripped.
As a result, adding separateDebugInfo = true on a lib will break the
static build (unless the lib also contains an executable). In order to
not have to remember to add an exception every time, let's just create
the debug output unconditionally.
  • Loading branch information
symphorien committed Mar 12, 2023
1 parent 0c4800d commit 94c7bf5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkgs/build-support/setup-hooks/separate-debug-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ _separateDebugInfo() {
local dst="${debug:-$out}"
if [ "$prefix" = "$dst" ]; then return 0; fi

# in case there is nothing to strip, don't fail the build
mkdir -p "$dst"

dst="$dst/lib/debug/.build-id"

# Find executables and dynamic libraries.
Expand Down

0 comments on commit 94c7bf5

Please sign in to comment.