Skip to content

Commit

Permalink
build(guix): add debug symbols for osx (#5708)
Browse files Browse the repository at this point in the history
## 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]>
  • Loading branch information
PastaPastaPasta and UdjinM6 authored Nov 16, 2023
1 parent b5d8283 commit a81310a
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions contrib/guix/libexec/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,13 @@ mkdir -p "$DISTSRC"
# Build Dash Core
make --jobs="$JOBS" ${V:+V=1}

# Make macos-specific debug symbols
case "$HOST" in
*darwin*)
make -C src/ osx_debug
;;
esac

# Check that symbol/security checks tools are sane.
make test-security-check ${V:+V=1}
# Perform basic security checks on a series of executables.
Expand All @@ -308,14 +315,7 @@ mkdir -p "$DISTSRC"
INSTALLPATH="${PWD}/installed/${DISTNAME}"
mkdir -p "${INSTALLPATH}"
# Install built Dash Core to $INSTALLPATH
case "$HOST" in
*darwin*)
make install-strip DESTDIR="${INSTALLPATH}" ${V:+V=1}
;;
*)
make install DESTDIR="${INSTALLPATH}" ${V:+V=1}
;;
esac
make install DESTDIR="${INSTALLPATH}" ${V:+V=1}

case "$HOST" in
*darwin*)
Expand Down Expand Up @@ -355,7 +355,10 @@ mkdir -p "$DISTSRC"
rm -rf "${DISTNAME}/lib/pkgconfig"

case "$HOST" in
*darwin*) ;;
*darwin*)
# Copy dSYM-s
find ../src -name "*.dSYM" -exec cp -ra {} "${DISTNAME}/bin" \;
;;
*)
# Split binaries and libraries from their debug symbols
{
Expand Down Expand Up @@ -404,11 +407,16 @@ mkdir -p "$DISTSRC"
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 )
;;
*darwin*)
find "${DISTNAME}" -print0 \
find "${DISTNAME}" -not -path "*.dSYM*" -print0 \
| sort --zero-terminated \
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 )
find "${DISTNAME}" -path "*.dSYM*" -print0 \
| sort --zero-terminated \
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" \
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 )
;;
esac
) # $DISTSRC/installed
Expand Down

0 comments on commit a81310a

Please sign in to comment.