Skip to content

Commit 17c008e

Browse files
lszekerescopybara-github
authored andcommitted
Enforce being pedantic.
PiperOrigin-RevId: 740991314
1 parent 13130a3 commit 17c008e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.bazelrc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,19 @@ common --enable_platform_specific_config
1818
build --action_env=CC=clang
1919
build --action_env=CXX=clang++
2020

21-
# Use the C++17 standard.
21+
# Use the C++17 standard in a pedantic manner.
2222
build --cxxopt=-std=c++17
23-
# Warn about the extensions that are not supported in C++17.
24-
# TODO(b/391433873): Turn warnings into errors once existing warnings are fixed.
25-
build --cxxopt=-Wc++17-compat-pedantic
23+
build --cxxopt=-Wpedantic
24+
build --cxxopt=-Werror=pedantic
25+
build --cxxopt=-Wno-error=gcc-compat
2626
# Required by the cc_fuzztest_grammar_library rule, which uses the
2727
# "exec configuration" (https://bazel.build/reference/be/general#cross-compilation-considerations).
2828
# The --cxxopt flag does not apply to the exec configuration, only the
2929
# --host_cxxopt flag (https://bazel.build/docs/user-manual#host-cxxopt).
3030
build --host_cxxopt=-std=c++17
31-
build --host_cxxopt=-Wc++17-compat-pedantic
31+
build --host_cxxopt=-Wpedantic
32+
build --host_cxxopt=-Werror=pedantic
33+
build --host_cxxopt=-Wno-error=gcc-compat
3234

3335
# Build GoogleTest with ABSL support.
3436
build --define absl=1

0 commit comments

Comments
 (0)