File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,16 @@ GIT_VERSION = $(shell git describe --tags --always --match='v*')
2222LDFLAGS += -extldflags '-static' \
2323 -X github.com/kcp-dev/api-syncagent/internal/version.gitVersion=$(GIT_VERSION ) \
2424 -X github.com/kcp-dev/api-syncagent/internal/version.gitHead=$(GIT_HEAD )
25+ LDFLAGS_EXTRA ?= -w
26+
27+ ifdef DEBUG_BUILD
28+ GOFLAGS = -mod=readonly
29+ LDFLAGS_EXTRA =
30+ GOTOOLFLAGS_EXTRA = -gcflags=all="-N -l"
31+ endif
32+
2533BUILD_DEST ?= _build
26- GOTOOLFLAGS ?= $(GOBUILDFLAGS ) -ldflags '-w $(LDFLAGS ) ' $(GOTOOLFLAGS_EXTRA )
34+ GOTOOLFLAGS ?= $(GOBUILDFLAGS ) -ldflags '$(LDFLAGS ) $( LDFLAGS_EXTRA ) ' $(GOTOOLFLAGS_EXTRA )
2735GOARCH ?= $(shell go env GOARCH)
2836GOOS ?= $(shell go env GOOS)
2937
You can’t perform that action at this time.
0 commit comments