Merge pull request #76651 from dims/move-goldflags-to-an-overrideable-default

Move "-s -w" flags to GOLDFLAGS as an overridable default.
This commit is contained in:
Kubernetes Prow Robot 2019-04-18 13:01:57 -07:00 committed by GitHub
commit 71152575e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@
./hack/cherry_pick_pull.sh
./hack/ginkgo-e2e.sh
./hack/grab-profiles.sh
./hack/lib/golang.sh
./hack/lib/init.sh
./hack/lib/swagger.sh
./hack/lib/test.sh

View File

@ -693,7 +693,7 @@ kube::golang::build_binaries() {
host_platform=$(kube::golang::host_platform)
local goflags goldflags goasmflags gogcflags
goldflags="${GOLDFLAGS:-} -s -w $(kube::version::ldflags)"
goldflags="${GOLDFLAGS=-s -w} $(kube::version::ldflags)"
goasmflags="-trimpath=${KUBE_ROOT}"
gogcflags="${GOGCFLAGS:-} -trimpath=${KUBE_ROOT}"