Skip to content

Commit

Permalink
Makefile support for creating non-stripped builds with full debug sup…
Browse files Browse the repository at this point in the history
…port.

(NB: Should be compatible with dlv when run under go 1.9, however due to golang/go#23733 go 1.10 and 1.11 will cause dlv to produce an error)
  • Loading branch information
Danw33 committed Jul 7, 2018
1 parent ce3c84e commit 0eccd43
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ build:
build-static:
go build ${GOFLAGS} --tags static ${LDFLAGS} ${GCFLAGS} ${ASMFLAGS} -o ${BINARY} ./src

build-debug:
GOCACHE=off go build -x -tags nopkcs11 -ldflags='-X "main.Version=${VERSION}-dbg" -X "main.BuildTime=${BUILDTIME}"' -gcflags='all=-N -l -dwarflocationlists=true' -o ${BINARY}-dbg ./src

build-docker:
docker build -t ${VERSION} .

Expand Down

0 comments on commit 0eccd43

Please sign in to comment.