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