Skip to content

Commit c728bf4

Browse files
committed
Explicitly set GOOS when building binary
Signed-off-by: Evan Lezar <[email protected]>
1 parent f05e4e8 commit c728bf4

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)