Merge pull request #104164 from dims/allow-override-of-cgo-enabled

Allow override of KUBE_CGO_OVERRIDES (for switching on/off of `CGO_ENABLED`)
This commit is contained in:
Kubernetes Prow Robot
2021-08-05 16:37:26 -07:00
committed by GitHub
2 changed files with 3 additions and 0 deletions

View File

@@ -716,6 +716,7 @@ kube::golang::build_binaries_for_platform() {
-ldflags "${goldflags:-}"
-tags "${gotags:-}"
)
V=1 kube::log::info "> static build CGO_ENABLED=0: ${statics[*]}"
CGO_ENABLED=0 kube::golang::build_some_binaries "${statics[@]}"
fi
@@ -728,6 +729,7 @@ kube::golang::build_binaries_for_platform() {
-buildmode pie
-tags "${gotags:-}"
)
V=1 kube::log::info "> non-static build: ${nonstatics[*]}"
kube::golang::build_some_binaries "${nonstatics[@]}"
fi