It's somewhat tedious to explicitly set this option on all of our C++ targets, so I think ideally we should rely primarily on bazelrc files for setting compiler flags. I tried to completely remove `COPTS`, but unfortunately that did not work out--we have so many `-Wsign-compare` warnings that I think we need to keep suppressing them for now or else we will get a lot of complaints. However, I was able to get to the point where `-Wno-sign-compare` is the only flag we need in `COPTS` for non-Windows builds. I explicitly set `-DHAVE_ZLIB` on just the two targets that need it, and removed `-Wno-nonnull` since we are already compliant with that warning. I moved `-Woverloaded-virtual` to our bazelrc files so that CI will enforce that we remain compliant with that. PiperOrigin-RevId: 684863987pull/18776/head
parent
f64d63ca7a
commit
2e82a2d7bf
4 changed files with 11 additions and 6 deletions
@ -1,4 +1,5 @@ |
||||
import common.bazelrc |
||||
|
||||
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 |
||||
build --cxxopt="-Woverloaded-virtual" |
||||
build --copt="-Werror" --copt="-Wno-sign-compare" --copt="-Wno-sign-conversion" --copt="-Wno-error=sign-conversion" --copt="-Wno-deprecated-declarations" |
||||
|
@ -1,6 +1,7 @@ |
||||
import common.bazelrc |
||||
|
||||
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 |
||||
build --cxxopt="-Woverloaded-virtual" |
||||
build --copt="-Werror" --copt="-Wno-sign-compare" --copt="-Wno-sign-conversion" --copt="-Wno-error=sign-conversion" --copt="-Wno-deprecated-declarations" |
||||
common --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1 |
||||
common --xcode_version_config=@com_google_protobuf//.github:host_xcodes |
||||
common --xcode_version_config=@com_google_protobuf//.github:host_xcodes |
||||
|
Loading…
Reference in new issue