Skip to content

Commit 717033d

Browse files
committed
Allow building with debug symbols by setting GODEBUG
Signed-off-by: Kern Walster <[email protected]>
1 parent bfe0847 commit 717033d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ ifneq ($(STATIC),)
2727
endif
2828
GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(strip $(GO_BUILDTAGS))",)
2929

30-
GO_LD_FLAGS=-ldflags '-s -w -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) $(GO_EXTRA_LDFLAGS)
30+
GO_LD_FLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) $(GO_EXTRA_LDFLAGS)
31+
ifeq ($(GODEBUG),)
32+
GO_LD_FLAGS += -s -w
33+
endif
3134
ifneq ($(STATIC),)
3235
GO_LD_FLAGS += -extldflags "-static"
3336
endif

0 commit comments

Comments
 (0)