From 4b24aa2d7f3b348ae4fb4fdab8de12d918855b06 Mon Sep 17 00:00:00 2001 From: Abhishek Shah Date: Fri, 13 Mar 2015 23:33:10 -0700 Subject: [PATCH] Build statically linked binaryies. With the change to go 1.4, we probably were generating dynamically linked binaries accidentally. --- hack/lib/golang.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index 2d3f092f84c..f897f810e91 100644 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -296,13 +296,13 @@ kube::golang::build_binaries() { if [[ ${GOOS} == "windows" ]]; then bin="${bin}.exe" fi - go build -o "${output_path}/${bin}" \ + CGO_ENABLED=0 go build -installsuffix cgo -o "${output_path}/${bin}" \ "${goflags[@]:+${goflags[@]}}" \ -ldflags "${version_ldflags}" \ "${binary}" done else - go install "${goflags[@]:+${goflags[@]}}" \ + CGO_ENABLED=0 go install -installsuffix cgo "${goflags[@]:+${goflags[@]}}" \ -ldflags "${version_ldflags}" \ "${binaries[@]}" fi