commit | 7714c808cdf96de572c2067f062d95e8a68ca67c | [log] [tgz] |
---|---|---|
author | Mark Schaller <mschaller@google.com> | Thu Jan 09 18:44:44 2020 -0500 |
committer | Chris Parsons <cparsons@google.com> | Wed Jan 29 13:40:35 2020 -0500 |
tree | 4f1b5263e771a1aac505b8529585a38be4760732 | |
parent | eab39cc7b5a612f891fd1e5af5b45bdc1b66e6e1 [diff] |
Add gRPC's cc_grpc_library to //third_party/grpc/bazel This adds a simplified version of gRPC's cc_grpc_library to //third_party/grpc/bazel. I intend to replace the hacky cc_grpc_library implemented in //tools/build_rules:genproto.bzl and used by //src/main/protobuf:command_server_cc_proto with this one. Aside from a general cleanup, this version of the macro supports proto files/rules with dependencies. Future work with fine-grained failure reporting will add dependencies to command_server.proto. The added files, all BUILD/bzl, are taken from gRPC's v1.26.0 (commithash 'de893acb', see https://github.com/grpc/grpc/tree/v1.26.0). Because these resources are independent of Bazel's other imports from gRPC, there are no conflicts with the current imported version of gRPC's C++ sources. This includes a patch file, bazel.patch, which adapts gRPC's BUILD/bzl sources for use by Bazel. This simplifies the cc_grpc_library macro and its deps: * removes cc_grpc_library's grpc_only parameter (now always true) * removes its proto_only, well_known_protos parameters (now always false) * removes its use_external parameter (it was previously unused) * adds to it an extra_cc_library_kwargs parameter (forwarded to its generated cc_library rule) * removes "well_known_proto" functionality from generate_cc.bzl and protobuf.bzl * changes generate_cc's _protoc attribute to protoc * sets cc_grpc_library's generate_cc call's plugin and protoc arguments to Bazel's targets ("//third_party/grpc:cpp_plugin" and "//third_party/protobuf:protoc", respectively) * relativizes load statements throughout * adds "srcs" filegroup to the package's BUILD file and includes it in //third_party/grpc:srcs This also deletes the obsolete grpc.patch file.
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
See CONTRIBUTING.md