Skip to content

Commit d847b87

Browse files
chuckxcopybara-github
authored andcommitted
Silence C++ compilation warnings from external dependencies in the Bazel config.
PiperOrigin-RevId: 646978405 Change-Id: I5e68a04897660c7537b9d7302895adcd9250722e
1 parent 44c41cb commit d847b87

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.bazelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
# TODO: b/332650707 - Explicitly disable bzlmod until supported.
22
always --noenable_bzlmod
3+
34
# Minumum C++ version. Override it building this project with
45
# `bazel build --cxxopt='-std=c++<XY>' --host_cxxopt='c++<XY>' ...`
56
# (Both -std and --host_cxxopt must be set to force the desired version.)
67
build --cxxopt='-std=c++17' --host_cxxopt='-std=c++17'
78
build --java_language_version=8
89
build --java_runtime_version=local_jdk
10+
11+
# Silence all C/C++ warnings in external code.
12+
#
13+
# Note that this will not silence warnings from external headers included
14+
# in project code.
15+
build --per_file_copt=external/.*@-w
16+
build --host_per_file_copt=external/.*@-w

0 commit comments

Comments
 (0)