From 438248d26786304f3c5cd79b0e3a75b09303e071 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Wed, 19 Feb 2025 18:10:55 +0100 Subject: [PATCH] build release bins w/o symbols and debug --- mkrel.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mkrel.sh b/mkrel.sh index 94d3d8f..da821b1 100755 --- a/mkrel.sh +++ b/mkrel.sh @@ -52,8 +52,15 @@ for D in $DIST; do tardir="${tool}-${os}-${arch}-${version}" tarfile="releases/${tool}-${os}-${arch}-${version}.tar.gz" + + if test "$D" = "linux/amd64"; then + pie="-buildmode=pie" + fi + set -x - GOOS=${os} GOARCH=${arch} go build -tags osusergo,netgo -ldflags "-extldflags=-static" -o ${binfile} + GOOS=${os} GOARCH=${arch} go build -tags osusergo,netgo -ldflags "-extldflags=-static -w" --trimpath $pie -o ${binfile} + strip --strip-all ${binfile} + mkdir -p ${tardir} cp ${binfile} README.md LICENSE ${tardir}/ echo 'tool = anydb