chore: keep debug symbols in debug builds

Makes debugging easier.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
This commit is contained in:
Alexey Palazhchenko 2021-05-17 09:39:27 +00:00 committed by talos-bot
parent 1ce362e05e
commit 61ccbb3f5a

View File

@ -37,7 +37,7 @@ MGMT_HELPERS_PKG = github.com/talos-systems/talos/cmd/talosctl/pkg/mgmt/helpers
CGO_ENABLED ?= 0 CGO_ENABLED ?= 0
GO_BUILDFLAGS ?= GO_BUILDFLAGS ?=
GO_LDFLAGS ?= -s -w \ GO_LDFLAGS ?= \
-X $(VERSION_PKG).Name=$(NAME) \ -X $(VERSION_PKG).Name=$(NAME) \
-X $(VERSION_PKG).SHA=$(SHA) \ -X $(VERSION_PKG).SHA=$(SHA) \
-X $(VERSION_PKG).Tag=$(TAG) \ -X $(VERSION_PKG).Tag=$(TAG) \
@ -58,6 +58,8 @@ endif
ifeq ($(shell hack/parsebool.sh $(WITH_DEBUG); echo $$?), 1) ifeq ($(shell hack/parsebool.sh $(WITH_DEBUG); echo $$?), 1)
GO_BUILDFLAGS += -tags sidero.debug GO_BUILDFLAGS += -tags sidero.debug
else
GO_LDFLAGS += -s -w
endif endif
, := , , := ,