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.
2 parents 59f097e + 99257a9 commit 4966fa5Copy full SHA for 4966fa5
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