From 7e0a4c66e722bb367c4e7154c05db26189dceb31 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 12 Jan 2017 19:51:19 +0100 Subject: [PATCH] build.go: Make binaries completely static (disables cgo) --- build.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.go b/build.go index 6d3559b66..ec5566093 100644 --- a/build.go +++ b/build.go @@ -205,7 +205,7 @@ func cleanEnv() (env []string) { func build(cwd, goos, goarch, gopath string, args ...string) error { args = append([]string{"build"}, args...) cmd := exec.Command("go", args...) - cmd.Env = append(cleanEnv(), "GOPATH="+gopath, "GOARCH="+goarch, "GOOS="+goos) + cmd.Env = append(cleanEnv(), "GOPATH="+gopath, "GOARCH="+goarch, "GOOS="+goos, "CGO_ENABLED=0") cmd.Dir = cwd cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr