Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion make/go/dep_buf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ BUF_GO_INSTALL_PATH ?=
ifneq ($(BUF_GO_INSTALL_PATH),)
.PHONY: __goinstallbuf
__goinstallbuf:
go install $(BUF_GO_INSTALL_PATH)
go install $(GO_INSTALL_EXTRA_FLAGS) $(BUF_GO_INSTALL_PATH)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the flag here but not setting it across all the other go deps (this is a common build across projects using makego).


BUF := __goinstallbuf

Expand Down
18 changes: 12 additions & 6 deletions make/go/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ DISALLOW_NOLINT ?=
BUFPRIVATEUSAGE_PKGS ?=
# Settable
BANDEPS_CONFIG ?=
# Settable
GO_BUILD_EXTRA_FLAGS ?=
# Settable
GO_INSTALL_EXTRA_FLAGS ?= $(GO_BUILD_EXTRA_FLAGS)
# Settable
GO_TEST_EXTRA_FLAGS ?= $(GO_BUILD_EXTRA_FLAGS)

# Runtime
GOPKGS ?= $(GO_ALL_REPO_PKGS)
Expand All @@ -56,9 +62,9 @@ COVER_HTML := $(TMP)/cover.html
COVER_TXT := $(TMP)/cover.txt

ifdef GONOTESTCACHE
GO_TEST_FLAGS := -count=1
GO_TEST_FLAGS := -count=1 $(GO_TEST_EXTRA_FLAGS)
else
GO_TEST_FLAGS :=
GO_TEST_FLAGS := $(GO_TEST_EXTRA_FLAGS)
endif


Expand Down Expand Up @@ -198,7 +204,7 @@ prebuild::

.PHONY: build
build: prebuild ## Run go build.
go build ./...
go build $(GO_BUILD_EXTRA_FLAGS) ./...

.PHONY: pretest
pretest::
Expand Down Expand Up @@ -244,7 +250,7 @@ install:: ## Install all go binaries.
define gobinfunc
.PHONY: install$(notdir $(1))
install$(notdir $(1)):
go install ./$(1)
go install $(GO_INSTALL_EXTRA_FLAGS) ./$(1)

install:: install$(notdir $(1))

Expand All @@ -264,7 +270,7 @@ installtest::
define gotestbinfunc
.PHONY: installtest$(notdir $(1))
installtest$(notdir $(1)):
go install ./$(1)
go install $(GO_INSTALL_EXTRA_FLAGS) ./$(1)

installtest:: installtest$(notdir $(1))
endef
Expand All @@ -278,7 +284,7 @@ installtestwasm::
define gotestwasmfunc
.PHONY: installtestwasm$(notdir $(1))
installtestwasm$(notdir $(1)):
GOOS=wasip1 GOARCH=wasm go build -o $(GOBIN)/$(notdir $(1)).wasm ./$(1)
GOOS=wasip1 GOARCH=wasm go build $(GO_BUILD_EXTRA_FLAGS) -o $(GOBIN)/$(notdir $(1)).wasm ./$(1)

installtestwasm:: installtestwasm$(notdir $(1))
endef
Expand Down
Loading