Browse Source

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.
Tulir Asokan 3 năm trước cách đây
mục cha
commit
ed5f530d54
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      .gitlab-ci.yml

+ 1 - 1
.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: