mirror of
https://github.com/ipfs/kubo.git
synced 2025-05-17 23:16:11 +08:00
fix: override GOFLAGS
That way we can combine our GOFLAGS with the user specified ones. This also switches to the new -trimpath build flag for reproducible builds. fixes #7475
This commit is contained in:

committed by
Adin Schmahmann

parent
be171d5e3c
commit
480defab68
@ -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
|
||||
# Try to make building as reproducible as possible by stripping the go path.
|
||||
GOFLAGS += "-asmflags=all='-trimpath=$(GOPATH)'" "-gcflags=all='-trimpath=$(GOPATH)'"
|
||||
# Override so we can combine with the user's go flags.
|
||||
override GOFLAGS += -trimpath
|
||||
|
||||
ifeq ($(tarball-is),1)
|
||||
GOFLAGS += -mod=vendor
|
||||
|
Reference in New Issue
Block a user