SIGN IN SIGN UP

Protocol Buffers - Google's data interchange format

0 0 35 C++

Reduce our reliance on COPTS variable for compiler flags

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: 684863987
A
Adam Cozzette committed
2e82a2d7bf380eb3e83a20ab506e7546f96a4e01
Parent: f64d63c
Committed by Copybara-Service <copybara-worker@google.com> on 10/11/2024, 4:40:26 PM