Merge pull request #98508 from tonistiigi/arm64-cross

enable cross-compile CC config for non-amd64
This commit is contained in:
Kubernetes Prow Robot 2021-02-02 18:00:28 -08:00 committed by GitHub
commit 2d9e9290e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -416,6 +416,13 @@ kube::golang::set_platform_envs() {
;; ;;
esac esac
fi fi
# if CC is defined for platform then always enable it
ccenv=$(echo "$platform" | awk -F/ '{print "KUBE_" toupper($1) "_" toupper($2) "_CC"}')
if [ -n "${!ccenv-}" ]; then
export CGO_ENABLED=1
export CC="${!ccenv}"
fi
} }
kube::golang::unset_platform_envs() { kube::golang::unset_platform_envs() {