aboutsummaryrefslogtreecommitdiff
path: root/utils/bazel/.bazelrc
diff options
context:
space:
mode:
authorGeoffrey Martin-Noble <gcmn@google.com>2022-01-31 17:50:59 -0800
committerGeoffrey Martin-Noble <gcmn@google.com>2022-01-31 18:09:44 -0800
commitef72739eac18a92dac587e56a39addf0ec9bb05e (patch)
treec12050788b207950bc63eea3ff9716fce108e646 /utils/bazel/.bazelrc
parent1194b9cdda30df3b76f8dc932d438dc1b3f3ed6c (diff)
downloadllvm-ef72739eac18a92dac587e56a39addf0ec9bb05e.zip
llvm-ef72739eac18a92dac587e56a39addf0ec9bb05e.tar.gz
llvm-ef72739eac18a92dac587e56a39addf0ec9bb05e.tar.bz2
[Bazel] Don't fail the build on usage of deprecated APIs
Build failures are not a particularly helpful way to enforce not using deprecated APIs and that isn't the point of the Bazel build. At the same time, this removes `-Wno-unused` this is a check that we do enforce in the Google internal build and so are ok maintaining in our maintenance of the upstream Bazel build (the comment about not wanting to do so was from a time when this was in a separate repository and I was the only one maintaining it). Differential Revision: https://reviews.llvm.org/D118671
Diffstat (limited to 'utils/bazel/.bazelrc')
-rw-r--r--utils/bazel/.bazelrc14
1 files changed, 10 insertions, 4 deletions
diff --git a/utils/bazel/.bazelrc b/utils/bazel/.bazelrc
index 0ad6814..a89cd17 100644
--- a/utils/bazel/.bazelrc
+++ b/utils/bazel/.bazelrc
@@ -34,14 +34,16 @@ build:generic_clang --repo_env=CC=clang
# C++14 standard version is required.
build:generic_clang --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
+# Use `-Wall` and `-Werror` for Clang.
+build:generic_clang --copt=-Wall --copt=-Werror --host_copt=-Wall --host_copt=-Werror
+
# The Clang available on MacOS has a warning that isn't clean on MLIR code. The
# warning doesn't show up with more recent Clangs, so just disable for now.
build:generic_clang --cxxopt=-Wno-range-loop-analysis --host_cxxopt=-Wno-range-loop-analysis
-# Use `-Wall` and `-Werror` for Clang.
-build:generic_clang --copt=-Wall --copt=-Werror --host_copt=-Wall --host_copt=-Werror
-# This doesn't appear to be enforced by any upstream bot.
-build:generic_clang --copt=-Wno-unused --host_copt=-Wno-unused
+# Build errors are not a helpful way to enforce deprecation in-repo and it is
+# not the point of the Bazel build to catch usage of deprecated APIs.
+build:generic_clang --copt=-Wno-deprecated --host_copt=-Wno-deprecated
###############################################################################
# Options for "generic_gcc" builds: these options should generally apply to
@@ -57,6 +59,10 @@ build:generic_gcc --repo_env=CC=gcc
# C++14 standard version is required.
build:generic_gcc --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
+# Build errors are not a helpful way to enforce deprecation in-repo and it is
+# not the point of the Bazel build to catch usage of deprecated APIs.
+build:generic_gcc --copt=-Wno-deprecated --host_copt=-Wno-deprecated
+
# Disable GCC warnings that are noisy and/or false positives on LLVM code.
# These need to be global as some code triggering these is in header files.
build:generic_gcc --copt=-Wno-unused-parameter --host_copt=-Wno-unused-parameter