Skip to content

Commit

Permalink
add flags to strip debug info from binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed May 5, 2018
1 parent 37c6885 commit 5bdbb94
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ do
# Remove previous build
rm -f $GOPATH/bin/keygen
# Build
~/go/bin/gox -osarch="${plat}/${arc}" -output $GOPATH/bin/keygen ./keygen > /dev/null
~/go/bin/gox -osarch="${plat}/${arc}" -ldflags "-s -w" -output $GOPATH/bin/keygen ./keygen > /dev/null

for dbtag in "${dbtags[@]}"
do
Expand All @@ -51,9 +51,10 @@ do
rm -f $GOPATH/bin/init-db
# Build tinode server and database initializer for RethinkDb and MySQL.
~/go/bin/gox -osarch="${plat}/${arc}" \
-ldflags "-X main.buildstamp=`git describe --tags`" \
-ldflags "-s -w -X main.buildstamp=`git describe --tags`" \
-tags ${dbtag} -output $GOPATH/bin/tinode ./server > /dev/null
~/go/bin/gox -osarch="${plat}/${arc}" \
-ldflags "-s -w" \
-tags ${dbtag} -output $GOPATH/bin/init-db ./tinode-db > /dev/null
# Tar on Mac is inflexible about directories. Let's just copy release files to
# one directory.
Expand Down

0 comments on commit 5bdbb94

Please sign in to comment.