From 6adee03eecdd19cbffb88a316c7981f022005a64 Mon Sep 17 00:00:00 2001 From: Tom Wieczorek Date: Tue, 4 Feb 2025 11:30:54 +0100 Subject: [PATCH] Don't trim paths when DEBUG is not false This may help debuggers like delve to locate breakpoints. Signed-off-by: Tom Wieczorek --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9c38578eea72..9eb7a443a939 100644 --- a/Makefile +++ b/Makefile @@ -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