Skip to content

Commit 42b5b15

Browse files
build(guix): add debug symbols for osx (dashpay#5708)
## Issue being fixed or feature implemented Add debug symbols for Darwin ## What was done? Added Darwin debug symbols and combine them as output ## How Has This Been Tested? guix build ## Breaking Changes _Please describe any breaking changes your code introduces_ ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ --------- Co-authored-by: UdjinM6 <[email protected]>
1 parent c49628d commit 42b5b15

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

contrib/guix/libexec/build.sh

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,13 @@ mkdir -p "$DISTSRC"
286286
# Build Dash Core
287287
make --jobs="$JOBS" ${V:+V=1}
288288

289+
# Make macos-specific debug symbols
290+
case "$HOST" in
291+
*darwin*)
292+
make -C src/ osx_debug
293+
;;
294+
esac
295+
289296
# Check that symbol/security checks tools are sane.
290297
make test-security-check ${V:+V=1}
291298
# Perform basic security checks on a series of executables.
@@ -308,14 +315,7 @@ mkdir -p "$DISTSRC"
308315
INSTALLPATH="${PWD}/installed/${DISTNAME}"
309316
mkdir -p "${INSTALLPATH}"
310317
# Install built Dash Core to $INSTALLPATH
311-
case "$HOST" in
312-
*darwin*)
313-
make install-strip DESTDIR="${INSTALLPATH}" ${V:+V=1}
314-
;;
315-
*)
316-
make install DESTDIR="${INSTALLPATH}" ${V:+V=1}
317-
;;
318-
esac
318+
make install DESTDIR="${INSTALLPATH}" ${V:+V=1}
319319

320320
case "$HOST" in
321321
*darwin*)
@@ -355,7 +355,10 @@ mkdir -p "$DISTSRC"
355355
rm -rf "${DISTNAME}/lib/pkgconfig"
356356

357357
case "$HOST" in
358-
*darwin*) ;;
358+
*darwin*)
359+
# Copy dSYM-s
360+
find ../src -name "*.dSYM" -exec cp -ra {} "${DISTNAME}/bin" \;
361+
;;
359362
*)
360363
# Split binaries and libraries from their debug symbols
361364
{
@@ -404,11 +407,16 @@ mkdir -p "$DISTSRC"
404407
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 )
405408
;;
406409
*darwin*)
407-
find "${DISTNAME}" -print0 \
410+
find "${DISTNAME}" -not -path "*.dSYM*" -print0 \
408411
| sort --zero-terminated \
409412
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
410413
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \
411414
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 )
415+
find "${DISTNAME}" -path "*.dSYM*" -print0 \
416+
| sort --zero-terminated \
417+
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
418+
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" \
419+
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 )
412420
;;
413421
esac
414422
) # $DISTSRC/installed

0 commit comments

Comments
 (0)