Skip to content

Enforce being pedantic. #1612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@ common --enable_platform_specific_config
build --action_env=CC=clang
build --action_env=CXX=clang++

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

# Build GoogleTest with ABSL support.
build --define absl=1
Expand Down
Loading