From 1c28fdd8f1cd7f6c42b134c09e4739dd08b4cc98 Mon Sep 17 00:00:00 2001 From: Aravindh Puthiyaparambil Date: Tue, 5 Sep 2023 15:35:23 -0700 Subject: [PATCH] UPSTREAM: : Force using host go always and use host libriaries --- hack/lib/golang.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index 596196b13252b..8ad24b98a342d 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -356,7 +356,9 @@ kube::golang::is_statically_linked_library() { if [[ -n "${KUBE_CGO_OVERRIDES_LIST:+x}" ]]; then for e in "${KUBE_CGO_OVERRIDES_LIST[@]}"; do [[ "${1}" == *"/${e}" ]] && return 1; done; fi - for e in "${KUBE_STATIC_LIBRARIES[@]}"; do [[ "${1}" == *"/${e}" ]] && return 0; done; + if [[ -n "${KUBE_STATIC_LIBRARIES:+x}" ]]; then + for e in "${KUBE_STATIC_LIBRARIES[@]}"; do [[ "${1}" == *"/${e}" ]] && return 0; done; + fi if [[ -n "${KUBE_STATIC_OVERRIDES_LIST:+x}" ]]; then for e in "${KUBE_STATIC_OVERRIDES_LIST[@]}"; do [[ "${1}" == *"/${e}" ]] && return 0; done; fi