xref: /aosp_15_r20/external/grpc-grpc/src/compiler/BUILD (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1# gRPC Bazel BUILD file.
2#
3# Copyright 2016 gRPC authors.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9#     http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17load(
18    "//bazel:grpc_build_system.bzl",
19    "grpc_cc_library",
20    "grpc_proto_plugin",
21)
22
23package(
24    default_visibility = ["//visibility:public"],
25    features = [
26        "-layering_check",
27        "-parse_headers",
28    ],
29)
30
31licenses(["notice"])
32
33exports_files(["LICENSE"])
34
35grpc_cc_library(
36    name = "proto_parser_helper",
37    srcs = ["proto_parser_helper.cc"],
38    hdrs = ["proto_parser_helper.h"],
39    language = "c++",
40)
41
42grpc_cc_library(
43    name = "grpc_plugin_support",
44    srcs = [
45        "cpp_generator.cc",
46        "csharp_generator.cc",
47        "node_generator.cc",
48        "objective_c_generator.cc",
49        "php_generator.cc",
50        "python_generator.cc",
51        "ruby_generator.cc",
52    ],
53    hdrs = [
54        "config.h",
55        "config_protobuf.h",
56        "cpp_generator.h",
57        "cpp_generator_helpers.h",
58        "cpp_plugin.h",
59        "csharp_generator.h",
60        "csharp_generator_helpers.h",
61        "generator_helpers.h",
62        "node_generator.h",
63        "node_generator_helpers.h",
64        "objective_c_generator.h",
65        "objective_c_generator_helpers.h",
66        "php_generator.h",
67        "php_generator_helpers.h",
68        "protobuf_plugin.h",
69        "python_generator.h",
70        "python_generator_helpers.h",
71        "python_private_generator.h",
72        "ruby_generator.h",
73        "ruby_generator_helpers-inl.h",
74        "ruby_generator_map-inl.h",
75        "ruby_generator_string-inl.h",
76        "schema_interface.h",
77    ],
78    external_deps = [
79        "protobuf_clib",
80        "protobuf",
81    ],
82    language = "c++",
83    deps = [
84        "proto_parser_helper",
85        "//:grpc++_config_proto",
86    ],
87)
88
89grpc_proto_plugin(
90    name = "grpc_cpp_plugin",
91    srcs = ["cpp_plugin.cc"],
92    deps = [":grpc_plugin_support"],
93)
94
95grpc_proto_plugin(
96    name = "grpc_csharp_plugin",
97    srcs = ["csharp_plugin.cc"],
98    deps = [":grpc_plugin_support"],
99)
100
101grpc_proto_plugin(
102    name = "grpc_node_plugin",
103    srcs = ["node_plugin.cc"],
104    deps = [":grpc_plugin_support"],
105)
106
107grpc_proto_plugin(
108    name = "grpc_objective_c_plugin",
109    srcs = ["objective_c_plugin.cc"],
110    deps = [":grpc_plugin_support"],
111)
112
113grpc_proto_plugin(
114    name = "grpc_php_plugin",
115    srcs = ["php_plugin.cc"],
116    deps = [":grpc_plugin_support"],
117)
118
119grpc_proto_plugin(
120    name = "grpc_python_plugin",
121    srcs = ["python_plugin.cc"],
122    deps = [":grpc_plugin_support"],
123)
124
125grpc_proto_plugin(
126    name = "grpc_ruby_plugin",
127    srcs = ["ruby_plugin.cc"],
128    deps = [":grpc_plugin_support"],
129)
130