Skip to content

Commit 43a008c

Browse files
authored
Makefile: Statically building the binary to not depend on gcc compiler (#59)
This is to statically build the cmk binary. It means it doesn't depend on gcc being present to work. The use case is that the cmk binary without this won't work in any alpine docker image.
1 parent 27fb4c5 commit 43a008c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ PKGS = $(or $(PKG),$(shell $(GO) list ./... | grep -v "^$(PACKAGE)/vendor/")
2626
TESTPKGS = $(shell $(GO) list -f '{{ if or .TestGoFiles .XTestGoFiles }}{{ .ImportPath }}{{ end }}' $(PKGS))
2727
GIT_SHA = $(shell git rev-parse --short HEAD)
2828

29-
GO = go
29+
GO = CGO_ENABLED=0 go
3030
GODOC = godoc
3131
GOFMT = gofmt
3232
TIMEOUT = 15

0 commit comments

Comments
 (0)