From 9a1b42efbccf5177ca92e3b367a03c7beb6670f6 Mon Sep 17 00:00:00 2001 From: phlax Date: Thu, 26 Oct 2023 15:24:53 +0100 Subject: [PATCH] ci/go: Fix compiler for api.go target (#30529) Signed-off-by: Ryan Northey --- ci/build_setup.sh | 4 ++++ ci/do_ci.sh | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ci/build_setup.sh b/ci/build_setup.sh index 00f4c2c75227..ccfa25aa3121 100755 --- a/ci/build_setup.sh +++ b/ci/build_setup.sh @@ -56,6 +56,10 @@ function setup_gcc_toolchain() { } function setup_clang_toolchain() { + if [[ -n "$CLANG_TOOLCHAIN_SETUP" ]]; then + return + fi + export CLANG_TOOLCHAIN_SETUP=1 ENVOY_STDLIB="${ENVOY_STDLIB:-libc++}" if [[ -z "${ENVOY_RBE}" ]]; then if [[ "${ENVOY_STDLIB}" == "libc++" ]]; then diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 8263bde4d9bf..603ddc669bf3 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -278,9 +278,7 @@ case $CI_TARGET in ;& api.go) - if [[ -z "$NO_BUILD_SETUP" ]]; then - setup_clang_toolchain - fi + setup_clang_toolchain GO_IMPORT_BASE="github.com/envoyproxy/go-control-plane" GO_TARGETS=(@envoy_api//...) read -r -a GO_PROTOS <<< "$(bazel query "${BAZEL_GLOBAL_OPTIONS[@]}" "kind('go_proto_library', ${GO_TARGETS[*]})" | tr '\n' ' ')"