Skip to content

Commit 588901b

Browse files
committed
Switch bazel to default to Clang for C/C++ compilation.
1 parent a9ba21c commit 588901b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.bazelrc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,17 @@ build --copt=-fexceptions
5353
# safer than o+rx.
5454
build --spawn_strategy=sandboxed
5555

56-
# Use GCC for C/C++ compilation.
57-
build --action_env=CC=gcc
58-
build --action_env=CXX=g++
56+
# By default, use Clang for C/C++ compilation.
57+
build --action_env=CC=/usr/bin/clang-17
58+
build --action_env=CXX=/usr/bin/clang++-17
5959

6060
###########################################################################
6161

62-
build:clang --action_env=CC=/usr/bin/clang-17
63-
build:clang --action_env=CXX=/usr/bin/clang++-17
62+
# Use GCC for C/C++ compilation. By default, PyTorch/XLA continuous build
63+
# uses Clang. This option is useful for debugging, e.g. when we suspect
64+
# that the Clang set-up is buggy.
65+
build:gcc --action_env=CC=gcc
66+
build:gcc --action_env=CXX=g++
6467

6568
###########################################################################
6669

0 commit comments

Comments
 (0)