Merge branch 'make-binary-goos-explicit' into 'master'

Explicitly set GOOS when building binary

See merge request nvidia/container-toolkit/container-toolkit!33
This commit is contained in:
Evan Lezar 2021-06-14 10:12:24 +00:00
commit 17e76cad4d

View File

@ -27,8 +27,10 @@ MODULE := github.com/NVIDIA/nvidia-container-toolkit
docker-native:
include $(CURDIR)/docker/docker.mk
GOOS ?= linux
binary:
go build -ldflags "-s -w" -o "$(LIB_NAME)" $(MODULE)/cmd/$(LIB_NAME)
GOOS=$(GOOS) go build -ldflags "-s -w" -o "$(LIB_NAME)" $(MODULE)/cmd/$(LIB_NAME)
# Define the check targets for the Golang codebase
.PHONY: check fmt assert-fmt ineffassign lint misspell vet