From a96ff33f8278f271a2907a7485f4ab7f60d2ba2b Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 22 Oct 2021 22:33:22 +0000 Subject: [PATCH] bazel: Add CC=clang to clang configuration Just setting BAZEL_COMPILER=clang isn't enough to actually force clang. When the crosstool setup happens it uses the CC variable for this https://github.com/bazelbuild/bazel/blob/e1b842d755a01a693e79568ea11ca127b0e7bd21/tools/cpp/unix_cc_configure.bzl#L310 Signed-off-by: Keith Smiley --- .bazelrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.bazelrc b/.bazelrc index 4a9e2f9c319b..3ecdf39e8d50 100644 --- a/.bazelrc +++ b/.bazelrc @@ -47,6 +47,7 @@ build:sanitizer --test_tag_filters=-no_san # Common flags for Clang build:clang --action_env=BAZEL_COMPILER=clang +build:clang --action_env=CC=clang --action_env=CXX=clang++ build:clang --linkopt=-fuse-ld=lld # Flags for Clang + PCH