I am seeing quite a difference in what is produced when building with Bazel vs. CMake and I am wondering if Bazel is not intended to be a general-purpose build mechanism for non-Bazel projects? In my case I am packaging things up in RPMs and am having to do some gymnastics trying to use Bazel in that context.
For example, with CMake there is a short list of public libraries built:
including libgpr.
With Bazel, there is no such short list. It just builds everything and throws it in bazel-bin and it doesn't even build a libgpr. Instead it is named libgpr_base which means that you can't compile the bundled PHP extension against a Bazel-built grpc because it is expecting to find gpr_now() in libgpr as per:
The documentation states that "Bazel is the primary build system for gRPC C++ and if you're comfortable with using bazel, we can certainly recommend it. Using bazel will give you the best developer experience as well as faster and cleaner builds." but I am having trouble finding this cleanliness. It feels like I have overlooked some sort of "bazel run :install" mechanism to install the public binaries, libraries and headers to a target prefix.
-Rasmus