Skip to content

Commit

Permalink
bazel: Add CC=clang to clang configuration (envoyproxy#18732)
Browse files Browse the repository at this point in the history
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 <keithbsmiley@gmail.com>
  • Loading branch information
keith authored Oct 27, 2021
1 parent 3e9655e commit 895544c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 895544c

Please sign in to comment.