Support for using proto_library in this attribute was added in:
a5ee2c4d97
Legacy support for using .proto files will be removed in a future
version of Bazel.
All bazel crosstools automatically pass -Wall to compiles. The order of
operations is:
- bazel crosstool flags
- `--host_copt` flags and other variations like `--host_cxxopt`
- the `copts` defined on the rule
Because of this when protobuf produces warnings, there's no way to
disable them from the consumer side if they are re-enabled later by
another `-Wall` flag.
Not sure the history for why there were two objc_library targets, but
given the one has an issue about not working, merge them into a single
target and an alias.
- Use the alias for :objectivec since that naming doesn't seem to follow
the other targets *_library targets here.
- Update :protobuf_objc to be use for the working target and just inline
the sources/headers lists so there is less indirection in the file.
Fixes#5284
* objectivec: Quash -Wself-assign
* objectivec: Set -Wno-vla when building
Objective-C protobuf uses VLAs for performance reasons. Ensure Clang
doesn’t complain about them.
This change reduces the excessive warnings when compiling C++ protobufs like "external/protobuf_archive/python/google/protobuf/pyext/message.cc:2629:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]"
`python/google/__init__.py` declares the top-level 'google' namespace so that
`google.protobuf` can be imported alongside other Google Python modules like
`google.auth`.
This works well when installing protobuf via Pip, but the Bazel `//:python_srcs`
rule doesn't include this file in its `srcs`. Bazel implicitly creates an empty
`google/__init__.py`, which does *not* set up a namespace. The result is that
consuming Python protobuf via Bazel breaks all other Google Python libraries.
This fixes#4658.
@com_google_protobuf prefixed versions. This allows them to work in 3rd party
repositories.
Fix a bad visibility rule. :hidden does not exist, but :private does.