Skip to content

Commit

Permalink
Fixes #Jira CMBR-513. Package debug symbols for pgmemcache installer …
Browse files Browse the repository at this point in the history
…on OSX.
  • Loading branch information
agarwal-kritika committed Sep 25, 2018
1 parent e1dccb2 commit 75165e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pgmemcache/build-osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ cat <<PGMEMCACHE > $WD/pgmemcache/build-pgmemcache.sh
PG_PATH=$PG_PATH_OSX/server/staging_cache/\$PGMEM_PLATFORM
cd \$PGMEM_SOURCE
PATH=\$PG_PATH/bin:\$PATH make CFLAGS="$PG_ARCH_OSX_CFLAGS -I/opt/local/Current/include -arch x86_64" LDFLAGS="-L/opt/local/Current/lib -arch x86_64" || _die "Failed to build the pgmemcache for \$PGMEM_PLATFORM"
PATH=\$PG_PATH/bin:\$PATH make CFLAGS="$PG_ARCH_OSX_CFLAGS -g -I/opt/local/Current/include -arch x86_64" LDFLAGS="-L/opt/local/Current/lib -arch x86_64" || _die "Failed to build the pgmemcache for \$PGMEM_PLATFORM"
# Copying the binaries
mkdir -p \$PGMEM_STAGING/include || _die "Failed to create include directory"
Expand All @@ -108,6 +108,7 @@ cat <<PGMEMCACHE > $WD/pgmemcache/build-pgmemcache.sh
PGMEMCACHE

cd $WD
scp resources/create_debug_symbols.sh $PG_SSH_OSX:$PG_PATH_OSX
scp pgmemcache/build-pgmemcache.sh $PG_SSH_OSX:$PG_PATH_OSX/pgmemcache
ssh $PG_SSH_OSX "cd $PG_PATH_OSX/pgmemcache; sh ./build-pgmemcache.sh" || _die "Failed to build the pgmemcache on OSX VM"

Expand All @@ -118,6 +119,7 @@ PGMEMCACHE
echo "Copying the complete build to the successful staging directory"
ssh $PG_SSH_OSX "cd $PG_PATH_OSX; cp -PR pgmemcache/staging/osx.build/* pgmemcache/staging/osx" || _die "Couldn't copy the existing staging directory"

ssh $PG_SSH_OSX "cd $PG_PATH_OSX; chmod 755 create_debug_symbols.sh; sh ./create_debug_symbols.sh $PG_PATH_OSX/pgmemcache/staging/osx" || _die "Failed to create debug symbols for pgmemcache on OSX VM"
ssh $PG_SSH_OSX "echo PG_VERSION_PGMEMCACHE=$PG_VERSION_PGMEMCACHE > $PG_PATH_OSX/pgmemcache/staging/osx/versions-osx.sh" || _die "Failed to write pgmemcache version number into versions-osx.sh"
ssh $PG_SSH_OSX "echo PG_VERSION_PGMEMCACHE=$PG_VERSION_PGMEMCACHE >> $PG_PATH_OSX/pgmemcache/staging/osx/versions-osx.sh" || _die "Failed to write pgmemcache build number into versions-osx.sh"

Expand Down
2 changes: 1 addition & 1 deletion resources/create_debug_symbols.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ generate_debug_symbols()

if [ "$os" = "Darwin" ]
then
for tostripfile in `find . -type f | xargs -I{} file {} | grep "Mach-O 64-bit executable \| Mach-O 64-bit dynamically linked shared library\| Mach-O executable i386" | cut -d : -f 1 `
for tostripfile in `find . -type f | xargs -I{} file {} | grep "Mach-O 64-bit executable \| Mach-O 64-bit dynamically linked shared library\| Mach-O executable i386\| Mach-O 64-bit bundle" | cut -d : -f 1 `
do
$DSYMUTIL "${tostripfile}" -o "${STAGING_DIR}/symbols/${tostripfile}.dSYM"
$STRIP --strip-debug --strip-unneeded "${tostripfile}"
Expand Down

0 comments on commit 75165e7

Please sign in to comment.