From 983c93c6941fd66a54f8d57fcf2148477c173c9a Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 5 Sep 2024 06:36:56 +0100 Subject: [PATCH] bazel/ci: Dont break caches with `PATH` Signed-off-by: Ryan Northey --- .bazelrc | 4 ++-- bazel/setup_clang.sh | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.bazelrc b/.bazelrc index 90b9b112b170..efb8e171dc51 100644 --- a/.bazelrc +++ b/.bazelrc @@ -260,14 +260,14 @@ build:rbe-toolchain-clang --platforms=@envoy_build_tools//toolchains:rbe_linux_c build:rbe-toolchain-clang --host_platform=@envoy_build_tools//toolchains:rbe_linux_clang_platform build:rbe-toolchain-clang --crosstool_top=@envoy_build_tools//toolchains/configs/linux/clang/cc:toolchain build:rbe-toolchain-clang --extra_toolchains=@envoy_build_tools//toolchains/configs/linux/clang/config:cc-toolchain -build:rbe-toolchain-clang --action_env=CC=clang --action_env=CXX=clang++ --action_env=PATH=/usr/sbin:/usr/bin:/sbin:/bin:/opt/llvm/bin +build:rbe-toolchain-clang --action_env=CC=clang --action_env=CXX=clang++ build:rbe-toolchain-clang-libc++ --config=rbe-toolchain build:rbe-toolchain-clang-libc++ --platforms=@envoy_build_tools//toolchains:rbe_linux_clang_libcxx_platform build:rbe-toolchain-clang-libc++ --host_platform=@envoy_build_tools//toolchains:rbe_linux_clang_libcxx_platform build:rbe-toolchain-clang-libc++ --crosstool_top=@envoy_build_tools//toolchains/configs/linux/clang_libcxx/cc:toolchain build:rbe-toolchain-clang-libc++ --extra_toolchains=@envoy_build_tools//toolchains/configs/linux/clang_libcxx/config:cc-toolchain -build:rbe-toolchain-clang-libc++ --action_env=CC=clang --action_env=CXX=clang++ --action_env=PATH=/usr/sbin:/usr/bin:/sbin:/bin:/opt/llvm/bin +build:rbe-toolchain-clang-libc++ --action_env=CC=clang --action_env=CXX=clang++ build:rbe-toolchain-clang-libc++ --action_env=CXXFLAGS=-stdlib=libc++ build:rbe-toolchain-clang-libc++ --action_env=LDFLAGS=-stdlib=libc++ build:rbe-toolchain-clang-libc++ --define force_libcpp=enabled diff --git a/bazel/setup_clang.sh b/bazel/setup_clang.sh index 46308db868b4..19093d071a2b 100755 --- a/bazel/setup_clang.sh +++ b/bazel/setup_clang.sh @@ -11,9 +11,6 @@ if [[ ! -e "${LLVM_PREFIX}/bin/llvm-config" ]]; then exit 1 fi -PATH="$("${LLVM_PREFIX}"/bin/llvm-config --bindir):${PATH}" -export PATH - LLVM_VERSION="$(llvm-config --version)" LLVM_LIBDIR="$(llvm-config --libdir)" LLVM_TARGET="$(llvm-config --host-target)" @@ -21,7 +18,6 @@ LLVM_TARGET="$(llvm-config --host-target)" RT_LIBRARY_PATH="${LLVM_LIBDIR}/clang/${LLVM_VERSION}/lib/${LLVM_TARGET}" echo "# Generated file, do not edit. If you want to disable clang, just delete this file. -build:clang --action_env='PATH=${PATH}' --host_action_env='PATH=${PATH}' build:clang --action_env='LLVM_CONFIG=${LLVM_PREFIX}/bin/llvm-config' --host_action_env='LLVM_CONFIG=${LLVM_PREFIX}/bin/llvm-config' build:clang --repo_env='LLVM_CONFIG=${LLVM_PREFIX}/bin/llvm-config' build:clang --linkopt='-L$(llvm-config --libdir)'