Skip to content

Commit

Permalink
fix: use override GOFLAGS changes from 480defa but keep trimpath usag…
Browse files Browse the repository at this point in the history
…e as is
  • Loading branch information
aschmahmann committed Sep 9, 2020
1 parent 2535f4d commit 48b2f12
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mk/golang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48b2f12

Please sign in to comment.