From ed5f530d54a7cd8265081c912d6d1bd2a88b7f86 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 15 Aug 2021 22:53:06 +0300 Subject: [PATCH] Make CI binaries slightly smaller Disables symbol table and DWARF generation. Stack traces and other runtime debugging features should still work, only external tools like gdb won't. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index db63086..d007da7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ stages: - mkdir -p .cache - export GOPATH="$CI_PROJECT_DIR/.cache" - export GOCACHE="$CI_PROJECT_DIR/.cache/build" - - export GO_LDFLAGS="-linkmode external -extldflags -static -X main.Tag=$CI_COMMIT_TAG -X main.Commit=$CI_COMMIT_SHA -X 'main.BuildTime=`date '+%b %_d %Y, %H:%M:%S'`'" + - export GO_LDFLAGS="-s -w -linkmode external -extldflags -static -X main.Tag=$CI_COMMIT_TAG -X main.Commit=$CI_COMMIT_SHA -X 'main.BuildTime=`date '+%b %_d %Y, %H:%M:%S'`'" script: - go build -ldflags "$GO_LDFLAGS" -o mautrix-whatsapp artifacts: