From ec509e114a015cf191881611b3305e68bd8edd08 Mon Sep 17 00:00:00 2001 From: Devin Carr Date: Thu, 26 May 2022 10:52:39 -0700 Subject: [PATCH] TUN-6292: Debug builds for cloudflared Allow for cloudflared to be built with debug mode to be used with dlv exec --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index f82dbe8f..bfd64cf5 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,10 @@ ifneq ($(GO_BUILD_TAGS),) GO_BUILD_TAGS := -tags "$(GO_BUILD_TAGS)" endif +ifeq ($(debug), 1) + GO_BUILD_TAGS += -gcflags="all=-N -l" +endif + IMPORT_PATH := github.com/cloudflare/cloudflared PACKAGE_DIR := $(CURDIR)/packaging PREFIX := /usr