fix: use override GOFLAGS changes from 480defab68 but keep trimpath usage as is

This commit is contained in:
Adin Schmahmann 2020-09-09 13:48:36 -04:00
parent 2535f4de82
commit 48b2f1273a

View File

@ -6,12 +6,13 @@ export GO111MODULE=on
# pre-definitions
GOCC ?= go
GOTAGS ?=
unexport GOFLAGS
GOFLAGS ?=
GOTFLAGS ?=
# Unexport GOFLAGS so we only apply it where we actually want it.
unexport GOFLAGS
# Override so we can combine with the user's go flags.
# Try to make building as reproducible as possible by stripping the go path.
GOFLAGS += "-asmflags=all='-trimpath=$(GOPATH)'" "-gcflags=all='-trimpath=$(GOPATH)'"
override GOFLAGS += "-asmflags=all='-trimpath=$(GOPATH)'" "-gcflags=all='-trimpath=$(GOPATH)'"
ifeq ($(tarball-is),1)
GOFLAGS += -mod=vendor