Skip to content

Commit

Permalink
Don't trim paths when DEBUG is not false
Browse files Browse the repository at this point in the history
This may help debuggers like delve to locate breakpoints.

Signed-off-by: Tom Wieczorek <[email protected]>
  • Loading branch information
twz123 committed Feb 4, 2025
1 parent 0f21aa2 commit 6adee03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ TARGET_OS ?= linux
BUILD_UID ?= $(shell id -u)
BUILD_GID ?= $(shell id -g)
BUILD_GO_TAGS ?= osusergo
BUILD_GO_FLAGS = -tags=$(subst $(space),$(comma),$(BUILD_GO_TAGS)) -buildvcs=false -trimpath
BUILD_GO_FLAGS = -tags=$(subst $(space),$(comma),$(BUILD_GO_TAGS)) -buildvcs=false
BUILD_CGO_CFLAGS :=
BUILD_GO_LDFLAGS_EXTRA :=
DEBUG ?= false

VERSION ?= $(shell git describe --tags 2>/dev/null || printf v%s-dev+k0s '$(kubernetes_version)')
ifeq ($(DEBUG), false)
BUILD_GO_FLAGS += -trimpath
LD_FLAGS ?= -w -s
endif

Expand Down

0 comments on commit 6adee03

Please sign in to comment.