Skip to content

Commit cb8d08e

Browse files
committed
Strip debug symbols to reduce binary size by ~35%
1 parent 296cc65 commit cb8d08e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
GOOS: ${{ matrix.goos }}
4646
GOARCH: ${{ matrix.goarch }}
4747
run: |
48-
go build -ldflags "-X main.version=${{ github.ref_name }}" \
48+
go build -ldflags "-s -w -X main.version=${{ github.ref_name }}" \
4949
-o gpuaudit-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/gpuaudit
5050
- name: Upload release asset
5151
uses: softprops/action-gh-release@v2

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VERSION ?= dev
2-
LDFLAGS := -X main.version=$(VERSION)
2+
LDFLAGS := -s -w -X main.version=$(VERSION)
33

44
build:
55
go build -ldflags "$(LDFLAGS)" -o gpuaudit ./cmd/gpuaudit

0 commit comments

Comments
 (0)