no-op: add GOEXPERIMENT var

Signed-off-by: Ashley Davis <ashley.davis@venafi.com>
This commit is contained in:
Ashley Davis 2024-01-19 10:20:38 +00:00
parent 4a3a68e950
commit bd7e4f00a0
No known key found for this signature in database
2 changed files with 8 additions and 4 deletions

View File

@ -47,6 +47,10 @@ include make/git.mk
## @category Build
CGO_ENABLED ?= 0
## This flag is passed to `go build` to enable Go experiments. It's empty by default
## @category Build
GOEXPERIMENT ?= # empty by default
## Extra flags passed to 'go' when building. For example, use GOFLAGS=-v to turn on the
## verbose output.
## @category Build

View File

@ -182,11 +182,11 @@ export PATH := $(PWD)/$(BINDIR)/tools/goroot/bin:$(PATH)
GO := $(PWD)/$(BINDIR)/tools/go
endif
GOBUILD := CGO_ENABLED=$(CGO_ENABLED) GOMAXPROCS=$(GOBUILDPROCS) $(GO) build
GOTEST := CGO_ENABLED=$(CGO_ENABLED) $(GO) test
GOBUILD := CGO_ENABLED=$(CGO_ENABLED) GOEXPERIMENT=$(GOEXPERIMENT) GOMAXPROCS=$(GOBUILDPROCS) $(GO) build
GOTEST := CGO_ENABLED=$(CGO_ENABLED) GOEXPERIMENT=$(GOEXPERIMENT) $(GO) test
# overwrite $(GOTESTSUM) and add CGO_ENABLED variable
GOTESTSUM := CGO_ENABLED=$(CGO_ENABLED) $(GOTESTSUM)
# overwrite $(GOTESTSUM) and add relevant environment variables
GOTESTSUM := CGO_ENABLED=$(CGO_ENABLED) GOEXPERIMENT=$(GOEXPERIMENT) $(GOTESTSUM)
.PHONY: vendor-go
## By default, this Makefile uses the system's Go. You can use a "vendored"