From c728bf4b1efe705f5af716402947d9aae1b890ae Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Thu, 10 Jun 2021 10:40:06 +0200 Subject: [PATCH] Explicitly set GOOS when building binary Signed-off-by: Evan Lezar --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 19b1defd..b2403d18 100644 --- a/Makefile +++ b/Makefile @@ -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