Skip to content

Commit

Permalink
Allow building with debug symbols by setting GODEBUG
Browse files Browse the repository at this point in the history
Signed-off-by: Kern Walster <[email protected]>
  • Loading branch information
Kern-- committed Jun 11, 2024
1 parent bfe0847 commit 717033d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ ifneq ($(STATIC),)
endif
GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(strip $(GO_BUILDTAGS))",)

GO_LD_FLAGS=-ldflags '-s -w -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) $(GO_EXTRA_LDFLAGS)
GO_LD_FLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) $(GO_EXTRA_LDFLAGS)
ifeq ($(GODEBUG),)
GO_LD_FLAGS += -s -w
endif
ifneq ($(STATIC),)
GO_LD_FLAGS += -extldflags "-static"
endif
Expand Down

0 comments on commit 717033d

Please sign in to comment.