Skip to content

Commit eef9396

Browse files
committed
Add debug related flags to "make install-dev"
Create binary that is easier to inspect with gdb/vscode debugger. Reference: https://go.dev/doc/gdb
1 parent c838185 commit eef9396

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

GNUmakefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ WEBSITE_REPO=github.com/hashicorp/terraform-website
44
PKG_NAME=sumologic
55
PLUGIN_DIR=~/.terraform.d/plugins
66
UNAME=$(shell uname -m)
7+
DEBUG_FLAGS=-gcflags="all=-N -l"
78

89
default: build
910

@@ -22,9 +23,9 @@ install: fmtcheck
2223
install-dev: fmtcheck
2324
mkdir -vp $(PLUGIN_DIR)
2425
ifeq ($(UNAME), arm64)
25-
go build -o $(PLUGIN_DIR)/sumologic.com/dev/sumologic/1.0.0/darwin_arm64/terraform-provider-sumologic
26+
go build ${DEBUG_FLAGS} -o $(PLUGIN_DIR)/sumologic.com/dev/sumologic/1.0.0/darwin_arm64/terraform-provider-sumologic
2627
else
27-
go build -o $(PLUGIN_DIR)/sumologic.com/dev/sumologic/1.0.0/darwin_amd64/terraform-provider-sumologic
28+
go build ${DEBUG_FLAGS} -o $(PLUGIN_DIR)/sumologic.com/dev/sumologic/1.0.0/darwin_amd64/terraform-provider-sumologic
2829
endif
2930

3031
uninstall:

0 commit comments

Comments
 (0)