Skip to content

Commit 7115257

Browse files
authored
Merge pull request kubernetes#76651 from dims/move-goldflags-to-an-overrideable-default
Move "-s -w" flags to GOLDFLAGS as an overridable default.
2 parents 17fe18b + 7e01702 commit 7115257

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

hack/.shellcheck_failures

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
./hack/cherry_pick_pull.sh
2828
./hack/ginkgo-e2e.sh
2929
./hack/grab-profiles.sh
30+
./hack/lib/golang.sh
3031
./hack/lib/init.sh
3132
./hack/lib/swagger.sh
3233
./hack/lib/test.sh

hack/lib/golang.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ kube::golang::build_binaries() {
693693
host_platform=$(kube::golang::host_platform)
694694

695695
local goflags goldflags goasmflags gogcflags
696-
goldflags="${GOLDFLAGS:-} -s -w $(kube::version::ldflags)"
696+
goldflags="${GOLDFLAGS=-s -w} $(kube::version::ldflags)"
697697
goasmflags="-trimpath=${KUBE_ROOT}"
698698
gogcflags="${GOGCFLAGS:-} -trimpath=${KUBE_ROOT}"
699699

0 commit comments

Comments
 (0)