TUN-6292: Debug builds for cloudflared

Allow for cloudflared to be built with debug mode to be used with dlv exec
This commit is contained in:
Devin Carr 2022-05-26 10:52:39 -07:00
parent 7bc2462e36
commit ec509e114a
1 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,10 @@ ifneq ($(GO_BUILD_TAGS),)
GO_BUILD_TAGS := -tags "$(GO_BUILD_TAGS)" GO_BUILD_TAGS := -tags "$(GO_BUILD_TAGS)"
endif endif
ifeq ($(debug), 1)
GO_BUILD_TAGS += -gcflags="all=-N -l"
endif
IMPORT_PATH := github.com/cloudflare/cloudflared IMPORT_PATH := github.com/cloudflare/cloudflared
PACKAGE_DIR := $(CURDIR)/packaging PACKAGE_DIR := $(CURDIR)/packaging
PREFIX := /usr PREFIX := /usr