Laszlo Csomor | 5517168 | 2017-12-01 12:05:32 +0100 | [diff] [blame] | 1 | # Bazel (https://bazel.build/) BUILD file for Protobuf. |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 2 | |
Protobuf Team Bot | 21d75f8 | 2024-04-05 07:45:26 -0700 | [diff] [blame] | 3 | load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library") |
aiuto | 3ab1276 | 2024-02-13 09:06:30 -0800 | [diff] [blame] | 4 | load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix") |
Protobuf Team Bot | 21d75f8 | 2024-04-05 07:45:26 -0700 | [diff] [blame] | 5 | load("//bazel:cc_proto_library.bzl", "cc_proto_library") |
| 6 | load("//bazel:java_lite_proto_library.bzl", "java_lite_proto_library") |
| 7 | load("//bazel:java_proto_library.bzl", "java_proto_library") |
| 8 | load("//bazel:proto_library.bzl", "proto_library") |
| 9 | load("//bazel/toolchains:proto_lang_toolchain.bzl", "proto_lang_toolchain") |
Mike Kruskal | 723bd4c | 2023-02-28 14:07:48 -0800 | [diff] [blame] | 10 | load("//build_defs:cpp_opts.bzl", "COPTS", "LINK_OPTS") |
Mike Kruskal | 571b727 | 2023-11-21 12:08:51 -0800 | [diff] [blame] | 11 | load(":protobuf.bzl", "internal_objc_proto_library", "internal_php_proto_library", "internal_py_proto_library") |
David L. Jones | 46710ca | 2022-04-20 16:26:44 -0700 | [diff] [blame] | 12 | |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 13 | licenses(["notice"]) |
| 14 | |
Piotr Sikora | faea19c | 2016-08-04 15:32:14 -0700 | [diff] [blame] | 15 | exports_files(["LICENSE"]) |
| 16 | |
Jorge Canizales | d5d7bb3 | 2015-06-28 15:23:02 -0700 | [diff] [blame] | 17 | ################################################################################ |
Jakob Buchgraber | 699c0eb | 2017-09-05 17:15:10 +0200 | [diff] [blame] | 18 | # Well Known Types Proto Library Rules |
| 19 | # |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 20 | # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf |
| 21 | ################################################################################ |
Jakob Buchgraber | 699c0eb | 2017-09-05 17:15:10 +0200 | [diff] [blame] | 22 | # These proto_library rules can be used with one of the language specific proto |
| 23 | # library rules i.e. java_proto_library: |
| 24 | # |
| 25 | # java_proto_library( |
| 26 | # name = "any_java_proto", |
Protobuf Team Bot | 21d75f8 | 2024-04-05 07:45:26 -0700 | [diff] [blame] | 27 | # deps = ["@protobuf//:any_proto"], |
Jakob Buchgraber | 699c0eb | 2017-09-05 17:15:10 +0200 | [diff] [blame] | 28 | # ) |
| 29 | ################################################################################ |
| 30 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 31 | alias( |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 32 | name = "any_proto", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 33 | actual = "//src/google/protobuf:any_proto", |
Jakob Buchgraber | 699c0eb | 2017-09-05 17:15:10 +0200 | [diff] [blame] | 34 | visibility = ["//visibility:public"], |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 35 | ) |
Jakob Buchgraber | 699c0eb | 2017-09-05 17:15:10 +0200 | [diff] [blame] | 36 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 37 | alias( |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 38 | name = "api_proto", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 39 | actual = "//src/google/protobuf:api_proto", |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 40 | visibility = ["//visibility:public"], |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 41 | ) |
| 42 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 43 | alias( |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 44 | name = "duration_proto", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 45 | actual = "//src/google/protobuf:duration_proto", |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 46 | visibility = ["//visibility:public"], |
| 47 | ) |
| 48 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 49 | alias( |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 50 | name = "empty_proto", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 51 | actual = "//src/google/protobuf:empty_proto", |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 52 | visibility = ["//visibility:public"], |
| 53 | ) |
| 54 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 55 | alias( |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 56 | name = "field_mask_proto", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 57 | actual = "//src/google/protobuf:field_mask_proto", |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 58 | visibility = ["//visibility:public"], |
| 59 | ) |
| 60 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 61 | alias( |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 62 | name = "source_context_proto", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 63 | actual = "//src/google/protobuf:source_context_proto", |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 64 | visibility = ["//visibility:public"], |
| 65 | ) |
| 66 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 67 | alias( |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 68 | name = "struct_proto", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 69 | actual = "//src/google/protobuf:struct_proto", |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 70 | visibility = ["//visibility:public"], |
| 71 | ) |
| 72 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 73 | alias( |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 74 | name = "timestamp_proto", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 75 | actual = "//src/google/protobuf:timestamp_proto", |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 76 | visibility = ["//visibility:public"], |
| 77 | ) |
| 78 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 79 | alias( |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 80 | name = "type_proto", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 81 | actual = "//src/google/protobuf:type_proto", |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 82 | visibility = ["//visibility:public"], |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 83 | ) |
| 84 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 85 | alias( |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 86 | name = "wrappers_proto", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 87 | actual = "//src/google/protobuf:wrappers_proto", |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 88 | visibility = ["//visibility:public"], |
| 89 | ) |
| 90 | |
Adam Cozzette | a7b0421 | 2024-01-03 15:17:41 -0800 | [diff] [blame] | 91 | # C++ targets for the well-known types |
| 92 | |
| 93 | alias( |
| 94 | name = "any_cc_proto", |
| 95 | actual = "//src/google/protobuf:any_cc_proto", |
| 96 | visibility = ["//visibility:public"], |
| 97 | ) |
| 98 | |
| 99 | alias( |
| 100 | name = "api_cc_proto", |
| 101 | actual = "//src/google/protobuf:api_cc_proto", |
| 102 | visibility = ["//visibility:public"], |
| 103 | ) |
| 104 | |
| 105 | alias( |
| 106 | name = "duration_cc_proto", |
| 107 | actual = "//src/google/protobuf:duration_cc_proto", |
| 108 | visibility = ["//visibility:public"], |
| 109 | ) |
| 110 | |
| 111 | alias( |
| 112 | name = "empty_cc_proto", |
| 113 | actual = "//src/google/protobuf:empty_cc_proto", |
| 114 | visibility = ["//visibility:public"], |
| 115 | ) |
| 116 | |
| 117 | alias( |
| 118 | name = "field_mask_cc_proto", |
| 119 | actual = "//src/google/protobuf:field_mask_cc_proto", |
| 120 | visibility = ["//visibility:public"], |
| 121 | ) |
| 122 | |
| 123 | alias( |
| 124 | name = "source_context_cc_proto", |
| 125 | actual = "//src/google/protobuf:source_context_cc_proto", |
| 126 | visibility = ["//visibility:public"], |
| 127 | ) |
| 128 | |
| 129 | alias( |
| 130 | name = "struct_cc_proto", |
| 131 | actual = "//src/google/protobuf:struct_cc_proto", |
| 132 | visibility = ["//visibility:public"], |
| 133 | ) |
| 134 | |
| 135 | alias( |
| 136 | name = "timestamp_cc_proto", |
| 137 | actual = "//src/google/protobuf:timestamp_cc_proto", |
| 138 | visibility = ["//visibility:public"], |
| 139 | ) |
| 140 | |
| 141 | alias( |
| 142 | name = "type_cc_proto", |
| 143 | actual = "//src/google/protobuf:type_cc_proto", |
| 144 | visibility = ["//visibility:public"], |
| 145 | ) |
| 146 | |
| 147 | alias( |
| 148 | name = "wrappers_cc_proto", |
| 149 | actual = "//src/google/protobuf:wrappers_cc_proto", |
| 150 | visibility = ["//visibility:public"], |
| 151 | ) |
| 152 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 153 | # Source files: these are aliases to a filegroup, not a `proto_library`. |
| 154 | # |
| 155 | # (This is _probably_ not what you want.) |
| 156 | alias( |
| 157 | name = "lite_well_known_protos", |
| 158 | actual = "//src/google/protobuf:well_known_type_protos", # filegroup |
| 159 | visibility = ["//visibility:public"], |
| 160 | ) |
| 161 | |
| 162 | alias( |
| 163 | name = "well_known_type_protos", |
| 164 | actual = "//src/google/protobuf:well_known_type_protos", # filegroup |
| 165 | visibility = ["//visibility:public"], |
| 166 | ) |
| 167 | |
| 168 | # Built-in runtime protos: these are part of protobuf's internal |
| 169 | # implementation, but are not Well-Known Types. |
| 170 | |
| 171 | alias( |
| 172 | name = "descriptor_proto", |
| 173 | actual = "//src/google/protobuf:descriptor_proto", # proto_library |
| 174 | visibility = ["//visibility:public"], |
| 175 | ) |
| 176 | |
| 177 | alias( |
| 178 | name = "descriptor_proto_srcs", |
| 179 | actual = "//src/google/protobuf:descriptor_proto_srcs", # filegroup |
| 180 | visibility = ["//visibility:public"], |
| 181 | ) |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 182 | |
David L. Jones | cbd1adc | 2022-05-17 16:39:47 -0700 | [diff] [blame] | 183 | alias( |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 184 | name = "compiler_plugin_proto", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 185 | actual = "//src/google/protobuf/compiler:plugin_proto", # proto_library |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 186 | visibility = ["//visibility:public"], |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 187 | ) |
| 188 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 189 | cc_library( |
| 190 | name = "cc_wkt_protos", |
| 191 | deprecation = "Only for backward compatibility. Do not use.", |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 192 | visibility = ["//visibility:public"], |
| 193 | ) |
| 194 | |
David L. Jones | ceaae1b | 2022-05-26 16:32:15 -0700 | [diff] [blame] | 195 | # Source protos that are typically part of the protobuf runtime. |
| 196 | # |
| 197 | # DEPRECATED: Prefer :well_known_type_protos for the Well-Known Types |
| 198 | # (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) |
| 199 | # or :descriptor_proto(_srcs) for descriptor.proto (source), or |
| 200 | # :compiler_plugin_proto for compiler/plugin.proto. |
| 201 | filegroup( |
| 202 | name = "well_known_protos", |
| 203 | srcs = [ |
| 204 | ":descriptor_proto_srcs", |
| 205 | ":well_known_type_protos", |
| 206 | "//src/google/protobuf/compiler:plugin.proto", |
| 207 | ], |
| 208 | deprecation = "Prefer :well_known_type_protos instead.", |
| 209 | visibility = ["//visibility:public"], |
| 210 | ) |
| 211 | |
Jakob Buchgraber | 699c0eb | 2017-09-05 17:15:10 +0200 | [diff] [blame] | 212 | ################################################################################ |
Jorge Canizales | d5d7bb3 | 2015-06-28 15:23:02 -0700 | [diff] [blame] | 213 | # Protocol Buffers Compiler |
| 214 | ################################################################################ |
| 215 | |
Protobuf Team Bot | 7787f3e | 2022-12-16 03:07:20 -0800 | [diff] [blame] | 216 | alias( |
| 217 | name = "protoc_lib", |
| 218 | actual = "//src/google/protobuf/compiler:protoc_lib", |
| 219 | visibility = ["//visibility:public"], |
| 220 | ) |
| 221 | |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 222 | cc_binary( |
| 223 | name = "protoc", |
Mike Kruskal | d220b43 | 2022-08-29 18:19:38 -0400 | [diff] [blame] | 224 | copts = COPTS, |
Mike Kruskal | 723bd4c | 2023-02-28 14:07:48 -0800 | [diff] [blame] | 225 | linkopts = LINK_OPTS, |
| 226 | visibility = ["//visibility:public"], |
| 227 | deps = ["//src/google/protobuf/compiler:protoc_lib"], |
| 228 | ) |
| 229 | |
| 230 | cc_binary( |
| 231 | name = "protoc_static", |
| 232 | copts = COPTS, |
Mike Kruskal | 723bd4c | 2023-02-28 14:07:48 -0800 | [diff] [blame] | 233 | features = select({ |
Adam Cozzette | 501ecec | 2023-09-26 14:36:20 -0700 | [diff] [blame] | 234 | # This isn't possible on mac because there is no static library for lcrt0.o |
| 235 | "@platforms//os:osx": [], |
| 236 | "//build_defs:config_osx": [], |
| 237 | # When cross-compiling we need to statically link all C++ libraries. |
| 238 | "//conditions:default": ["fully_static_link"], |
Mike Kruskal | 723bd4c | 2023-02-28 14:07:48 -0800 | [diff] [blame] | 239 | }), |
Adam Cozzette | 501ecec | 2023-09-26 14:36:20 -0700 | [diff] [blame] | 240 | linkopts = LINK_OPTS, |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 241 | visibility = ["//visibility:public"], |
David L. Jones | cbd1adc | 2022-05-17 16:39:47 -0700 | [diff] [blame] | 242 | deps = ["//src/google/protobuf/compiler:protoc_lib"], |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 243 | ) |
| 244 | |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 245 | ################################################################################ |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 246 | # C++ runtime |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 247 | ################################################################################ |
| 248 | |
Protobuf Team Bot | 5b6c245 | 2023-09-14 12:04:25 -0700 | [diff] [blame] | 249 | # Expose the runtime for the proto_lang_toolchain so that it can also be used in |
| 250 | # a user-defined proto_lang_toolchain. |
| 251 | alias( |
Adam Cozzette | a7b0421 | 2024-01-03 15:17:41 -0800 | [diff] [blame] | 252 | name = "protobuf", |
Adam Cozzette | c32c04c | 2024-02-14 10:00:03 -0800 | [diff] [blame] | 253 | actual = "//src/google/protobuf:protobuf_layering_check_legacy", |
Adam Cozzette | a7b0421 | 2024-01-03 15:17:41 -0800 | [diff] [blame] | 254 | visibility = ["//visibility:public"], |
| 255 | ) |
| 256 | |
| 257 | alias( |
Adam Cozzette | 501ecec | 2023-09-26 14:36:20 -0700 | [diff] [blame] | 258 | name = "protobuf_nowkt", |
Adam Cozzette | c32c04c | 2024-02-14 10:00:03 -0800 | [diff] [blame] | 259 | actual = "//src/google/protobuf:protobuf_layering_check_legacy", |
Adam Cozzette | a7b0421 | 2024-01-03 15:17:41 -0800 | [diff] [blame] | 260 | deprecation = "Use //:protobuf instead", |
Adam Cozzette | 501ecec | 2023-09-26 14:36:20 -0700 | [diff] [blame] | 261 | visibility = ["//visibility:public"], |
Protobuf Team Bot | 5b6c245 | 2023-09-14 12:04:25 -0700 | [diff] [blame] | 262 | ) |
| 263 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 264 | # The "lite" runtime works for .proto files that specify the option: |
| 265 | # optimize_for = LITE_RUNTIME; |
| 266 | # |
| 267 | # The lite runtime does not include the `Reflection` APIs (including |
| 268 | # `Descriptor` and related types) or Well-Known Types. |
| 269 | # |
| 270 | # See also: |
| 271 | # https://developers.google.com/protocol-buffers/docs/reference/cpp-generated#message |
| 272 | # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf |
| 273 | alias( |
| 274 | name = "protobuf_lite", |
| 275 | actual = "//src/google/protobuf:protobuf_lite", |
| 276 | visibility = ["//visibility:public"], |
David L. Jones | cbd1adc | 2022-05-17 16:39:47 -0700 | [diff] [blame] | 277 | ) |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 278 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 279 | # This provides just the header files for use in projects that need to build |
| 280 | # shared libraries for dynamic loading. This target is available until Bazel |
| 281 | # adds native support for such use cases. |
Sandy Zhang | 81068e8 | 2023-09-18 15:13:49 -0700 | [diff] [blame] | 282 | # TODO: Remove this target once the support gets added to Bazel. |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 283 | alias( |
| 284 | name = "protobuf_headers", |
| 285 | actual = "//src/google/protobuf:protobuf_headers", |
| 286 | visibility = ["//visibility:public"], |
Jisi Liu | 7a0c431 | 2015-06-18 16:45:27 -0700 | [diff] [blame] | 287 | ) |
Jisi Liu | 993fb70 | 2015-10-19 17:19:49 -0700 | [diff] [blame] | 288 | |
Mike Kruskal | 32bea52 | 2022-10-06 16:48:39 -0700 | [diff] [blame] | 289 | alias( |
| 290 | name = "json", |
| 291 | actual = "//src/google/protobuf/json", |
| 292 | visibility = ["//visibility:public"], |
| 293 | ) |
| 294 | |
Adam Cozzette | 220548f | 2024-02-07 15:56:12 -0800 | [diff] [blame] | 295 | alias( |
| 296 | name = "delimited_message_util", |
| 297 | actual = "//src/google/protobuf/util:delimited_message_util", |
| 298 | visibility = ["//visibility:public"], |
| 299 | ) |
| 300 | |
| 301 | alias( |
| 302 | name = "differencer", |
| 303 | actual = "//src/google/protobuf/util:differencer", |
| 304 | visibility = ["//visibility:public"], |
| 305 | ) |
| 306 | |
| 307 | alias( |
| 308 | name = "field_mask_util", |
| 309 | actual = "//src/google/protobuf/util:field_mask_util", |
| 310 | visibility = ["//visibility:public"], |
| 311 | ) |
| 312 | |
| 313 | alias( |
| 314 | name = "json_util", |
| 315 | actual = "//src/google/protobuf/util:json_util", |
| 316 | visibility = ["//visibility:public"], |
| 317 | ) |
| 318 | |
| 319 | alias( |
| 320 | name = "time_util", |
| 321 | actual = "//src/google/protobuf/util:time_util", |
| 322 | visibility = ["//visibility:public"], |
| 323 | ) |
| 324 | |
| 325 | alias( |
| 326 | name = "type_resolver", |
| 327 | actual = "//src/google/protobuf/util:type_resolver", |
| 328 | visibility = ["//visibility:public"], |
| 329 | ) |
| 330 | |
Mike Kruskal | ea81024 | 2024-04-16 11:11:03 -0700 | [diff] [blame] | 331 | alias( |
| 332 | name = "cpp_features_proto", |
| 333 | actual = "//src/google/protobuf:cpp_features_proto", # proto_library |
| 334 | visibility = ["//visibility:public"], |
| 335 | ) |
| 336 | |
Jisi Liu | 993fb70 | 2015-10-19 17:19:49 -0700 | [diff] [blame] | 337 | ################################################################################ |
| 338 | # Java support |
| 339 | ################################################################################ |
Yannic | f0cb9cd | 2020-02-13 22:04:14 +0100 | [diff] [blame] | 340 | |
Yannic | f0cb9cd | 2020-02-13 22:04:14 +0100 | [diff] [blame] | 341 | alias( |
Jisi Liu | 166e9bb | 2015-10-21 10:56:38 -0700 | [diff] [blame] | 342 | name = "protobuf_java", |
Yannic | f0cb9cd | 2020-02-13 22:04:14 +0100 | [diff] [blame] | 343 | actual = "//java/core", |
Jisi Liu | 993fb70 | 2015-10-19 17:19:49 -0700 | [diff] [blame] | 344 | visibility = ["//visibility:public"], |
| 345 | ) |
| 346 | |
Yannic | f0cb9cd | 2020-02-13 22:04:14 +0100 | [diff] [blame] | 347 | alias( |
Carmi Grushko | 5c25f41 | 2019-05-24 17:26:07 +0300 | [diff] [blame] | 348 | name = "protobuf_javalite", |
Yannic | f0cb9cd | 2020-02-13 22:04:14 +0100 | [diff] [blame] | 349 | actual = "//java/lite", |
Jisi Liu | 993fb70 | 2015-10-19 17:19:49 -0700 | [diff] [blame] | 350 | visibility = ["//visibility:public"], |
| 351 | ) |
| 352 | |
Yannic | f0cb9cd | 2020-02-13 22:04:14 +0100 | [diff] [blame] | 353 | alias( |
Steven Parkes | a9244ca | 2016-03-10 17:50:25 -0800 | [diff] [blame] | 354 | name = "protobuf_java_util", |
Yannic | f0cb9cd | 2020-02-13 22:04:14 +0100 | [diff] [blame] | 355 | actual = "//java/util", |
Manjunath Kudlur | 2d430f8 | 2017-02-23 08:17:24 -0800 | [diff] [blame] | 356 | visibility = ["//visibility:public"], |
Yannic | f0cb9cd | 2020-02-13 22:04:14 +0100 | [diff] [blame] | 357 | ) |
| 358 | |
| 359 | alias( |
| 360 | name = "java_toolchain", |
| 361 | actual = "//java/core:toolchain", |
| 362 | visibility = ["//visibility:public"], |
| 363 | ) |
| 364 | |
| 365 | alias( |
| 366 | name = "javalite_toolchain", |
| 367 | actual = "//java/lite:toolchain", |
| 368 | visibility = ["//visibility:public"], |
Steven Parkes | a9244ca | 2016-03-10 17:50:25 -0800 | [diff] [blame] | 369 | ) |
| 370 | |
Mike Kruskal | ea81024 | 2024-04-16 11:11:03 -0700 | [diff] [blame] | 371 | alias( |
| 372 | name = "java_features_proto", |
| 373 | actual = "//java/core:java_features_proto", # proto_library |
| 374 | visibility = ["//visibility:public"], |
| 375 | ) |
| 376 | |
Jisi Liu | 993fb70 | 2015-10-19 17:19:49 -0700 | [diff] [blame] | 377 | ################################################################################ |
| 378 | # Python support |
| 379 | ################################################################################ |
| 380 | |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 381 | alias( |
Joshua Haberman | a6901f0 | 2022-04-25 22:00:57 +0000 | [diff] [blame] | 382 | name = "protobuf_python", |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 383 | actual = "//python:protobuf_python", |
| 384 | visibility = ["//visibility:public"], |
Jisi Liu | 993fb70 | 2015-10-19 17:19:49 -0700 | [diff] [blame] | 385 | ) |
| 386 | |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 387 | alias( |
| 388 | name = "python_srcs", |
| 389 | actual = "//python:python_srcs", |
Adam Cozzette | 501ecec | 2023-09-26 14:36:20 -0700 | [diff] [blame] | 390 | visibility = ["//python:__subpackages__"], |
David Z. Chen | 02cd45c | 2016-05-20 16:49:04 -0700 | [diff] [blame] | 391 | ) |
| 392 | |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 393 | alias( |
| 394 | name = "python_test_srcs", |
| 395 | actual = "//python:python_test_srcs", |
Adam Cozzette | 501ecec | 2023-09-26 14:36:20 -0700 | [diff] [blame] | 396 | visibility = ["//python:__subpackages__"], |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 397 | ) |
Manjunath Kudlur | 2d430f8 | 2017-02-23 08:17:24 -0800 | [diff] [blame] | 398 | |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 399 | alias( |
| 400 | name = "well_known_types_py_pb2", |
| 401 | actual = "//python:well_known_types_py_pb2", |
Adam Cozzette | 4176256 | 2022-07-21 23:38:04 +0000 | [diff] [blame] | 402 | visibility = ["//visibility:public"], |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 403 | ) |
David Z. Chen | 02cd45c | 2016-05-20 16:49:04 -0700 | [diff] [blame] | 404 | |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 405 | alias( |
Jisi Liu | 993fb70 | 2015-10-19 17:19:49 -0700 | [diff] [blame] | 406 | name = "python_common_test_protos", |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 407 | actual = "//python:python_common_test_protos", |
Joshua Haberman | a6901f0 | 2022-04-25 22:00:57 +0000 | [diff] [blame] | 408 | visibility = ["//visibility:public"], |
Jisi Liu | 993fb70 | 2015-10-19 17:19:49 -0700 | [diff] [blame] | 409 | ) |
| 410 | |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 411 | alias( |
Jisi Liu | 993fb70 | 2015-10-19 17:19:49 -0700 | [diff] [blame] | 412 | name = "python_specific_test_protos", |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 413 | actual = "//python:python_specific_test_protos", |
Joshua Haberman | a6901f0 | 2022-04-25 22:00:57 +0000 | [diff] [blame] | 414 | visibility = ["//visibility:public"], |
Thomas Colthurst | 7c65142 | 2018-05-29 18:26:11 -0400 | [diff] [blame] | 415 | ) |
| 416 | |
cgrushko | 45d92ae | 2016-12-02 19:40:50 -0500 | [diff] [blame] | 417 | proto_lang_toolchain( |
Manjunath Kudlur | 2d430f8 | 2017-02-23 08:17:24 -0800 | [diff] [blame] | 418 | name = "cc_toolchain", |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 419 | blacklisted_protos = [ |
Protobuf Team Bot | 64ae02c | 2022-12-20 10:02:34 -0800 | [diff] [blame] | 420 | "//:compiler_plugin_proto", |
| 421 | "//:descriptor_proto", |
David L. Jones | 5ebde5b | 2022-05-05 13:29:47 -0700 | [diff] [blame] | 422 | ], |
Manjunath Kudlur | 2d430f8 | 2017-02-23 08:17:24 -0800 | [diff] [blame] | 423 | command_line = "--cpp_out=$(OUT)", |
Adam Cozzette | a7b0421 | 2024-01-03 15:17:41 -0800 | [diff] [blame] | 424 | runtime = "//src/google/protobuf", |
Manjunath Kudlur | 2d430f8 | 2017-02-23 08:17:24 -0800 | [diff] [blame] | 425 | visibility = ["//visibility:public"], |
cgrushko | 45d92ae | 2016-12-02 19:40:50 -0500 | [diff] [blame] | 426 | ) |
cgrushko | e4baf3f | 2017-01-12 12:51:04 -0500 | [diff] [blame] | 427 | |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 428 | ################################################################################ |
| 429 | # Objective-C support |
| 430 | ################################################################################ |
| 431 | |
Thomas Van Lenten | 18aa296 | 2018-11-01 09:37:14 -0400 | [diff] [blame] | 432 | alias( |
| 433 | name = "objectivec", |
Yannic Bonenberger | 8b93b8e | 2020-07-08 17:21:38 +0200 | [diff] [blame] | 434 | actual = "//objectivec", |
David L. Jones | 67823fe | 2022-05-04 17:30:23 -0700 | [diff] [blame] | 435 | tags = ["manual"], |
Thomas Van Lenten | 18aa296 | 2018-11-01 09:37:14 -0400 | [diff] [blame] | 436 | visibility = ["//visibility:public"], |
| 437 | ) |
makdharma | 286f059 | 2017-05-01 09:49:26 -0700 | [diff] [blame] | 438 | |
Yannic Bonenberger | 8b93b8e | 2020-07-08 17:21:38 +0200 | [diff] [blame] | 439 | alias( |
Thomas Van Lenten | 18aa296 | 2018-11-01 09:37:14 -0400 | [diff] [blame] | 440 | name = "protobuf_objc", |
Yannic Bonenberger | 8b93b8e | 2020-07-08 17:21:38 +0200 | [diff] [blame] | 441 | actual = "//objectivec", |
David L. Jones | 67823fe | 2022-05-04 17:30:23 -0700 | [diff] [blame] | 442 | tags = ["manual"], |
makdharma | 286f059 | 2017-05-01 09:49:26 -0700 | [diff] [blame] | 443 | visibility = ["//visibility:public"], |
| 444 | ) |
Fahrzin Hemmati | 0d68b29 | 2018-03-26 19:08:26 -0700 | [diff] [blame] | 445 | |
| 446 | ################################################################################ |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 447 | # Test protos |
Fahrzin Hemmati | 0d68b29 | 2018-03-26 19:08:26 -0700 | [diff] [blame] | 448 | ################################################################################ |
| 449 | |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 450 | alias( |
Mike Kruskal | 81e3513 | 2022-09-19 11:08:21 -0700 | [diff] [blame] | 451 | name = "lite_test_proto_srcs", |
| 452 | actual = "//src/google/protobuf:lite_test_proto_srcs", # proto_library |
| 453 | visibility = ["//:__subpackages__"], |
| 454 | ) |
| 455 | |
| 456 | alias( |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 457 | name = "lite_test_protos", |
| 458 | actual = "//src/google/protobuf:lite_test_protos", # proto_library |
| 459 | visibility = ["//:__subpackages__"], |
| 460 | ) |
| 461 | |
| 462 | alias( |
| 463 | name = "test_proto_srcs", |
| 464 | actual = "//src/google/protobuf:test_proto_srcs", # filegroup |
| 465 | visibility = ["//:__subpackages__"], |
| 466 | ) |
| 467 | |
| 468 | alias( |
Sandy Zhang | 65c65c2 | 2024-01-22 09:54:16 -0800 | [diff] [blame] | 469 | name = "test_proto_editions_srcs", |
| 470 | actual = "//src/google/protobuf:test_proto_editions_srcs", # filegroup |
| 471 | visibility = ["//:__subpackages__"], |
| 472 | ) |
| 473 | |
| 474 | alias( |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 475 | name = "test_protos", |
| 476 | actual = "//src/google/protobuf:test_protos", # proto_library |
| 477 | visibility = ["//:__subpackages__"], |
| 478 | ) |
| 479 | |
| 480 | # Validate generated proto source inputs: |
| 481 | |
Fahrzin Hemmati | 0d68b29 | 2018-03-26 19:08:26 -0700 | [diff] [blame] | 482 | genrule( |
| 483 | name = "generated_protos", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 484 | testonly = 1, |
| 485 | srcs = ["//src/google/protobuf:test_proto_srcs"], |
David L. Jones | 67823fe | 2022-05-04 17:30:23 -0700 | [diff] [blame] | 486 | outs = ["unittest_gen_import.proto"], |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 487 | cmd = "cat src/google/protobuf/unittest_import.proto > $@", |
Fahrzin Hemmati | 0d68b29 | 2018-03-26 19:08:26 -0700 | [diff] [blame] | 488 | ) |
| 489 | |
| 490 | proto_library( |
| 491 | name = "generated_protos_proto", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 492 | testonly = 1, |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 493 | srcs = [":generated_protos"], |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 494 | deps = ["//src/google/protobuf:generic_test_protos"], |
Fahrzin Hemmati | 0d68b29 | 2018-03-26 19:08:26 -0700 | [diff] [blame] | 495 | ) |
| 496 | |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 497 | internal_py_proto_library( |
Fahrzin Hemmati | 0d68b29 | 2018-03-26 19:08:26 -0700 | [diff] [blame] | 498 | name = "generated_protos_py", |
David L. Jones | 171a6b1 | 2022-05-18 13:45:22 -0700 | [diff] [blame] | 499 | testonly = 1, |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 500 | srcs = [":generated_protos"], |
Fahrzin Hemmati | 0d68b29 | 2018-03-26 19:08:26 -0700 | [diff] [blame] | 501 | default_runtime = "", |
| 502 | protoc = ":protoc", |
David L. Jones | b3cbea1 | 2022-05-12 19:48:58 -0700 | [diff] [blame] | 503 | deps = ["//python:python_common_test_protos"], |
Fahrzin Hemmati | 0d68b29 | 2018-03-26 19:08:26 -0700 | [diff] [blame] | 504 | ) |
Josh Haberman | 6dec8cf | 2018-11-03 12:59:45 -0700 | [diff] [blame] | 505 | |
| 506 | ################################################################################ |
| 507 | # Conformance tests |
| 508 | ################################################################################ |
| 509 | |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 510 | cc_proto_library( |
| 511 | name = "test_messages_proto2_cc_proto", |
| 512 | visibility = [ |
| 513 | "//conformance:__pkg__", |
| 514 | "//src:__subpackages__", |
| 515 | ], |
| 516 | deps = ["//src/google/protobuf:test_messages_proto2_proto"], |
David L. Jones | 637a699 | 2022-05-06 13:30:48 -0700 | [diff] [blame] | 517 | ) |
| 518 | |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 519 | cc_proto_library( |
| 520 | name = "test_messages_proto3_cc_proto", |
| 521 | visibility = [ |
| 522 | "//conformance:__pkg__", |
| 523 | "//src:__subpackages__", |
| 524 | ], |
| 525 | deps = ["//src/google/protobuf:test_messages_proto3_proto"], |
Josh Haberman | 6dec8cf | 2018-11-03 12:59:45 -0700 | [diff] [blame] | 526 | ) |
| 527 | |
Deanna Garcia | ab4585a | 2022-02-01 18:24:53 +0000 | [diff] [blame] | 528 | java_proto_library( |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 529 | name = "test_messages_proto2_java_proto", |
| 530 | visibility = [ |
David L. Jones | 637a699 | 2022-05-06 13:30:48 -0700 | [diff] [blame] | 531 | "//conformance:__pkg__", |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 532 | "//java:__subpackages__", |
| 533 | ], |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 534 | deps = ["//src/google/protobuf:test_messages_proto2_proto"], |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 535 | ) |
| 536 | |
| 537 | java_proto_library( |
| 538 | name = "test_messages_proto3_java_proto", |
| 539 | visibility = [ |
David L. Jones | 637a699 | 2022-05-06 13:30:48 -0700 | [diff] [blame] | 540 | "//conformance:__pkg__", |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 541 | "//java:__subpackages__", |
Tamir Duberstein | 7e97fd4 | 2021-08-04 08:03:24 -0400 | [diff] [blame] | 542 | ], |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 543 | deps = ["//src/google/protobuf:test_messages_proto3_proto"], |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 544 | ) |
| 545 | |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 546 | java_lite_proto_library( |
| 547 | name = "test_messages_proto2_java_proto_lite", |
| 548 | visibility = [ |
David L. Jones | 637a699 | 2022-05-06 13:30:48 -0700 | [diff] [blame] | 549 | "//conformance:__pkg__", |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 550 | "//java:__subpackages__", |
| 551 | ], |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 552 | deps = ["//src/google/protobuf:test_messages_proto2_proto"], |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 553 | ) |
| 554 | |
| 555 | java_lite_proto_library( |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 556 | name = "test_messages_proto3_java_proto_lite", |
| 557 | visibility = [ |
David L. Jones | 637a699 | 2022-05-06 13:30:48 -0700 | [diff] [blame] | 558 | "//conformance:__pkg__", |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 559 | "//java:__subpackages__", |
| 560 | ], |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 561 | deps = ["//src/google/protobuf:test_messages_proto3_proto"], |
| 562 | ) |
| 563 | |
| 564 | internal_objc_proto_library( |
| 565 | name = "test_messages_proto2_objc_proto", |
Mike Kruskal | ca4b063 | 2022-08-11 20:55:01 -0700 | [diff] [blame] | 566 | testonly = 1, |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 567 | srcs = ["//src/google/protobuf:test_messages_proto2.proto"], |
| 568 | includes = ["src/google/protobuf"], |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 569 | visibility = [ |
| 570 | "//conformance:__pkg__", |
| 571 | "//objectivec:__subpackages__", |
| 572 | ], |
| 573 | ) |
| 574 | |
| 575 | internal_objc_proto_library( |
| 576 | name = "test_messages_proto3_objc_proto", |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 577 | testonly = 1, |
Mike Kruskal | ca4b063 | 2022-08-11 20:55:01 -0700 | [diff] [blame] | 578 | srcs = ["//src/google/protobuf:test_messages_proto3.proto"], |
| 579 | includes = [ |
Mike Kruskal | ca4b063 | 2022-08-11 20:55:01 -0700 | [diff] [blame] | 580 | "src/google/protobuf", |
Mike Kruskal | ba6d173 | 2022-08-12 10:44:59 -0700 | [diff] [blame] | 581 | # The above must come first. |
| 582 | "src", |
Mike Kruskal | ca4b063 | 2022-08-11 20:55:01 -0700 | [diff] [blame] | 583 | ], |
| 584 | proto_deps = [":well_known_protos"], |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 585 | visibility = [ |
| 586 | "//conformance:__pkg__", |
| 587 | "//objectivec:__subpackages__", |
| 588 | ], |
| 589 | ) |
| 590 | |
| 591 | internal_php_proto_library( |
| 592 | name = "test_messages_proto3_php_proto", |
Mike Kruskal | ca4b063 | 2022-08-11 20:55:01 -0700 | [diff] [blame] | 593 | testonly = 1, |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 594 | srcs = ["//src/google/protobuf:test_messages_proto3.proto"], |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 595 | outs = [ |
Mike Kruskal | ca4b063 | 2022-08-11 20:55:01 -0700 | [diff] [blame] | 596 | "GPBMetadata/TestMessagesProto3.php", |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 597 | "Protobuf_test_messages/Proto3/EnumOnlyProto3.php", |
| 598 | "Protobuf_test_messages/Proto3/EnumOnlyProto3/PBBool.php", |
| 599 | "Protobuf_test_messages/Proto3/ForeignEnum.php", |
| 600 | "Protobuf_test_messages/Proto3/ForeignMessage.php", |
| 601 | "Protobuf_test_messages/Proto3/NullHypothesisProto3.php", |
| 602 | "Protobuf_test_messages/Proto3/TestAllTypesProto3.php", |
| 603 | "Protobuf_test_messages/Proto3/TestAllTypesProto3/AliasedEnum.php", |
| 604 | "Protobuf_test_messages/Proto3/TestAllTypesProto3/NestedEnum.php", |
| 605 | "Protobuf_test_messages/Proto3/TestAllTypesProto3/NestedMessage.php", |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 606 | ], |
Mike Kruskal | ca4b063 | 2022-08-11 20:55:01 -0700 | [diff] [blame] | 607 | includes = [ |
Mike Kruskal | ca4b063 | 2022-08-11 20:55:01 -0700 | [diff] [blame] | 608 | "src/google/protobuf", |
Mike Kruskal | ba6d173 | 2022-08-12 10:44:59 -0700 | [diff] [blame] | 609 | # The above must come first. |
| 610 | "src", |
Mike Kruskal | ca4b063 | 2022-08-11 20:55:01 -0700 | [diff] [blame] | 611 | ], |
| 612 | proto_deps = [":well_known_protos"], |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 613 | visibility = [ |
| 614 | "//conformance:__pkg__", |
| 615 | "//php:__subpackages__", |
| 616 | ], |
| 617 | ) |
| 618 | |
UebelAndre | ae26a81 | 2021-08-06 08:08:32 -0700 | [diff] [blame] | 619 | filegroup( |
| 620 | name = "bzl_srcs", |
| 621 | srcs = glob(["**/*.bzl"]), |
| 622 | visibility = ["//visibility:public"], |
| 623 | ) |
Deanna Garcia | ab4585a | 2022-02-01 18:24:53 +0000 | [diff] [blame] | 624 | |
David L. Jones | d76f8c8 | 2022-04-22 16:58:16 -0700 | [diff] [blame] | 625 | ################################################################################ |
| 626 | # Packaging rules |
| 627 | ################################################################################ |
| 628 | |
| 629 | # Files included in all source distributions |
| 630 | pkg_files( |
| 631 | name = "common_dist_files", |
David L. Jones | 67823fe | 2022-05-04 17:30:23 -0700 | [diff] [blame] | 632 | srcs = glob( |
| 633 | [ |
| 634 | "*.bzl", |
| 635 | "cmake/*.cmake", |
| 636 | "cmake/*.in", |
| 637 | "editors/*", |
David L. Jones | 67823fe | 2022-05-04 17:30:23 -0700 | [diff] [blame] | 638 | ], |
| 639 | allow_empty = True, |
| 640 | ) + [ |
David L. Jones | 95da0ba | 2022-04-29 17:57:55 -0700 | [diff] [blame] | 641 | "BUILD.bazel", |
David L. Jones | d76f8c8 | 2022-04-22 16:58:16 -0700 | [diff] [blame] | 642 | "CMakeLists.txt", |
| 643 | "CONTRIBUTORS.txt", |
| 644 | "LICENSE", |
David L. Jones | d76f8c8 | 2022-04-22 16:58:16 -0700 | [diff] [blame] | 645 | "README.md", |
| 646 | "WORKSPACE", |
David L. Jones | d76f8c8 | 2022-04-22 16:58:16 -0700 | [diff] [blame] | 647 | "cmake/README.md", |
| 648 | "generate_descriptor_proto.sh", |
| 649 | "maven_install.json", |
David L. Jones | 354aba8 | 2022-05-09 16:32:59 -0700 | [diff] [blame] | 650 | "//third_party:BUILD.bazel", |
David L. Jones | d76f8c8 | 2022-04-22 16:58:16 -0700 | [diff] [blame] | 651 | "//third_party:zlib.BUILD", |
David L. Jones | d76f8c8 | 2022-04-22 16:58:16 -0700 | [diff] [blame] | 652 | ], |
| 653 | strip_prefix = strip_prefix.from_root(""), |
| 654 | visibility = ["//pkg:__pkg__"], |
| 655 | ) |
| 656 | |
David L. Jones | d76f8c8 | 2022-04-22 16:58:16 -0700 | [diff] [blame] | 657 | # Additional files for C# |
| 658 | pkg_files( |
| 659 | name = "csharp_dist_files", |
| 660 | srcs = [ |
| 661 | "global.json", |
| 662 | ], |
| 663 | visibility = ["//pkg:__pkg__"], |
| 664 | ) |
| 665 | |
| 666 | # Additional files for ObjC |
| 667 | pkg_files( |
| 668 | name = "objectivec_dist_files", |
| 669 | srcs = [ |
| 670 | "Protobuf.podspec", |
| 671 | ], |
| 672 | visibility = ["//pkg:__pkg__"], |
| 673 | ) |