Skip to content

Commit 17e76ca

Browse files
author
Evan Lezar
committed
Merge branch 'make-binary-goos-explicit' into 'master'
Explicitly set GOOS when building binary See merge request nvidia/container-toolkit/container-toolkit!33
2 parents f05e4e8 + c728bf4 commit 17e76ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ MODULE := github.com/NVIDIA/nvidia-container-toolkit
2727
docker-native:
2828
include $(CURDIR)/docker/docker.mk
2929

30+
GOOS ?= linux
31+
3032
binary:
31-
go build -ldflags "-s -w" -o "$(LIB_NAME)" $(MODULE)/cmd/$(LIB_NAME)
33+
GOOS=$(GOOS) go build -ldflags "-s -w" -o "$(LIB_NAME)" $(MODULE)/cmd/$(LIB_NAME)
3234

3335
# Define the check targets for the Golang codebase
3436
.PHONY: check fmt assert-fmt ineffassign lint misspell vet

0 commit comments

Comments
 (0)