We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09d43ad commit 99257a9Copy full SHA for 99257a9
Makefile
@@ -22,8 +22,16 @@ GIT_VERSION = $(shell git describe --tags --always --match='v*')
22
LDFLAGS += -extldflags '-static' \
23
-X github.com/kcp-dev/api-syncagent/internal/version.gitVersion=$(GIT_VERSION) \
24
-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
33
BUILD_DEST ?= _build
-GOTOOLFLAGS ?= $(GOBUILDFLAGS) -ldflags '-w $(LDFLAGS)' $(GOTOOLFLAGS_EXTRA)
34
+GOTOOLFLAGS ?= $(GOBUILDFLAGS) -ldflags '$(LDFLAGS) $(LDFLAGS_EXTRA)' $(GOTOOLFLAGS_EXTRA)
35
GOARCH ?= $(shell go env GOARCH)
36
GOOS ?= $(shell go env GOOS)
37
0 commit comments