From a7b314cf3247f9446c4ecedd52dc3f3af0256103 Mon Sep 17 00:00:00 2001 From: ayntgl Date: Thu, 24 Feb 2022 14:27:16 +0400 Subject: [PATCH] build(Makefile): add -buildmode=pie to go build flags --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8bd9f3d..0685a05 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,19 @@ +.PHONY: build build: - go build -trimpath -ldflags "-s -w" . + go build \ + -trimpath \ + -buildmode=pie \ + -ldflags "-s -w" \ + . +.PHONY: test test: go test -v ./... +.PHONY: fmt fmt: gofmt -d -e -s . +.PHONY: clean clean: - go clean \ No newline at end of file + go clean