Skip to content

Commit 94c7bf5

Browse files
committed
separate-debug-info.sh: succeed when output does not contain elf files
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.
1 parent 0c4800d commit 94c7bf5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkgs/build-support/setup-hooks/separate-debug-info.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ _separateDebugInfo() {
1111
local dst="${debug:-$out}"
1212
if [ "$prefix" = "$dst" ]; then return 0; fi
1313

14+
# in case there is nothing to strip, don't fail the build
15+
mkdir -p "$dst"
16+
1417
dst="$dst/lib/debug/.build-id"
1518

1619
# Find executables and dynamic libraries.

0 commit comments

Comments
 (0)