Skip to content

Commit

Permalink
chore: keep debug symbols in debug builds
Browse files Browse the repository at this point in the history
Makes debugging easier.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
  • Loading branch information
AlekSi authored and talos-bot committed May 17, 2021
1 parent 1ce362e commit 61ccbb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ MGMT_HELPERS_PKG = github.com/talos-systems/talos/cmd/talosctl/pkg/mgmt/helpers

CGO_ENABLED ?= 0
GO_BUILDFLAGS ?=
GO_LDFLAGS ?= -s -w \
GO_LDFLAGS ?= \
-X $(VERSION_PKG).Name=$(NAME) \
-X $(VERSION_PKG).SHA=$(SHA) \
-X $(VERSION_PKG).Tag=$(TAG) \
Expand All @@ -58,6 +58,8 @@ endif

ifeq ($(shell hack/parsebool.sh $(WITH_DEBUG); echo $$?), 1)
GO_BUILDFLAGS += -tags sidero.debug
else
GO_LDFLAGS += -s -w
endif

, := ,
Expand Down

0 comments on commit 61ccbb3

Please sign in to comment.