aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 014c610..0dbb8fe 100644
--- a/Makefile
+++ b/Makefile
@@ -73,6 +73,10 @@ override GO_LINK_FLAGS += $(VERSION_FLAG) -extldflags "$(LDFLAGS)"
override GO_FLAGS += --ldflags '$(GO_LINK_FLAGS)'
# Always use Go modules
export GO111MODULE = on
+# Use -trimpath if available
+ifneq "" "$(shell go help build | grep trimpath)"
+override GO_FLAGS += -trimpath
+endif
###### Find All Files and Directories ######
FILES := $(shell find . -path '*/.git*' -prune -o -type f -printf "%P\n")