From 01d392d759a9c4da50f37c4a1f1745624d223c6e Mon Sep 17 00:00:00 2001 From: WaterLemons2k Date: Sat, 28 Jan 2023 17:33:19 +0800 Subject: [PATCH] feat(make): disable symbol table and DWARF generation by adding -s and -w options to -ldflags See: https://pkg.go.dev/cmd/link --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ed359ecc6..213bc98af 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ DIR_SRC=. DOCKER_CMD=docker GO_ENV=CGO_ENABLED=0 -GO_FLAGS=-ldflags="-X main.version=$(VERSION) -X 'main.buildTime=`date`' -extldflags -static" -trimpath +GO_FLAGS=-ldflags="-X main.version=$(VERSION) -X 'main.buildTime=`date`' -extldflags -static -s -w" -trimpath GO=$(GO_ENV) $(shell which go) GOROOT=$(shell `which go` env GOROOT) GOPATH=$(shell `which go` env GOPATH)