support remote debug component through delve if set DLV variable when make

This commit is contained in:
Rain
2019-07-17 20:37:18 +08:00
parent c688a6d14f
commit d5b0ed5ea5
+5 -2
View File
@@ -32,8 +32,11 @@ LDFLAGS := "-w \
#####################################################
GO_BUILD_FLAGS:=-mod vendor -ldflags $(LDFLAGS)
ifneq ($(DLV),)
GO_BUILD_FLAGS += -gcflags "all=-N -l"
LDFLAGS = ""
endif
GO_BUILD_FLAGS+=-mod vendor -ldflags $(LDFLAGS)
GO_BUILD := go build $(GO_BUILD_FLAGS)
GO_INSTALL := go install -ldflags $(LDFLAGS)
GO_TEST := go test