Joshua Haberman | 823eb09 | 2021-04-05 12:26:41 -0700 | [diff] [blame] | 1 | # Copyright (c) 2009-2021, Google LLC |
Joshua Haberman | e59d2c8 | 2021-04-05 10:47:53 -0700 | [diff] [blame] | 2 | # All rights reserved. |
| 3 | # |
| 4 | # Redistribution and use in source and binary forms, with or without |
| 5 | # modification, are permitted provided that the following conditions are met: |
| 6 | # * Redistributions of source code must retain the above copyright |
| 7 | # notice, this list of conditions and the following disclaimer. |
| 8 | # * Redistributions in binary form must reproduce the above copyright |
| 9 | # notice, this list of conditions and the following disclaimer in the |
| 10 | # documentation and/or other materials provided with the distribution. |
| 11 | # * Neither the name of Google LLC nor the |
| 12 | # names of its contributors may be used to endorse or promote products |
| 13 | # derived from this software without specific prior written permission. |
| 14 | # |
| 15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 16 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 17 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 18 | # DISCLAIMED. IN NO EVENT SHALL Google LLC BE LIABLE FOR ANY |
| 19 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 20 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 21 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 22 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 24 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 | |
Josh Haberman | 2655ed9 | 2018-11-03 13:04:10 -0700 | [diff] [blame] | 26 | load( |
Joshua Haberman | 5611ff2 | 2019-05-16 11:35:00 -0700 | [diff] [blame] | 27 | "//bazel:build_defs.bzl", |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 28 | "UPB_DEFAULT_COPTS", |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 29 | "UPB_DEFAULT_CPPOPTS", |
| 30 | "make_shell_script", |
Joshua Haberman | 06b90f9 | 2019-05-14 15:58:58 -0700 | [diff] [blame] | 31 | ) |
Joshua Haberman | 06b90f9 | 2019-05-14 15:58:58 -0700 | [diff] [blame] | 32 | load( |
Joshua Haberman | 5611ff2 | 2019-05-16 11:35:00 -0700 | [diff] [blame] | 33 | "//bazel:upb_proto_library.bzl", |
Joshua Haberman | a345af9 | 2020-10-18 13:39:13 -0700 | [diff] [blame] | 34 | "upb_fasttable_enabled", |
Josh Haberman | a7ebe54 | 2018-11-03 18:18:47 -0700 | [diff] [blame] | 35 | "upb_proto_library", |
Joshua Haberman | a274ad7 | 2020-10-28 13:06:30 -0700 | [diff] [blame] | 36 | "upb_proto_library_copts", |
Joshua Haberman | e8f9eac | 2020-10-28 22:50:03 -0700 | [diff] [blame] | 37 | "upb_proto_reflection_library", |
Josh Haberman | 2655ed9 | 2018-11-03 13:04:10 -0700 | [diff] [blame] | 38 | ) |
Joshua Haberman | 0dc2394 | 2020-06-05 09:17:33 -0700 | [diff] [blame] | 39 | |
Protobuf Team Bot | be98a91 | 2022-10-11 12:14:01 -0700 | [diff] [blame] | 40 | # begin:google_only |
| 41 | # load( |
| 42 | # "//third_party/bazel_rules/rules_kotlin/kotlin/native:native_interop_hint.bzl", |
| 43 | # "kt_native_interop_hint", |
| 44 | # ) |
| 45 | # end:google_only |
| 46 | |
Protobuf Team | b8edc71 | 2022-03-16 08:24:52 -0700 | [diff] [blame] | 47 | # begin:github_only |
| 48 | load( |
| 49 | "//bazel:build_defs.bzl", |
| 50 | "upb_amalgamation", |
| 51 | ) |
| 52 | # end:github_only |
| 53 | |
Joshua Haberman | 83c0edb | 2021-02-28 16:56:49 -0800 | [diff] [blame] | 54 | licenses(["notice"]) |
Joshua Haberman | 7f9f722 | 2019-01-23 17:10:22 -0800 | [diff] [blame] | 55 | |
Joshua Haberman | a5243ff | 2022-03-30 14:20:07 -0700 | [diff] [blame] | 56 | exports_files(["LICENSE"]) |
| 57 | |
| 58 | exports_files( |
| 59 | [ |
| 60 | "BUILD", |
| 61 | "WORKSPACE", |
| 62 | ], |
| 63 | visibility = ["//cmake:__pkg__"], |
| 64 | ) |
Joshua Haberman | 7f9f722 | 2019-01-23 17:10:22 -0800 | [diff] [blame] | 65 | |
Joshua Haberman | 00f96cb | 2019-03-27 12:13:59 -0700 | [diff] [blame] | 66 | config_setting( |
Nicolas "Pixel" Noble | ce3ba4d | 2019-07-18 01:12:00 +0200 | [diff] [blame] | 67 | name = "windows", |
Protobuf Team | e5f2601 | 2022-06-01 14:40:00 -0700 | [diff] [blame] | 68 | constraint_values = ["@platforms//os:windows"], |
Eli Schleifer | 231daa3 | 2021-12-20 16:01:23 -0800 | [diff] [blame] | 69 | visibility = ["//visibility:public"], |
Nicolas "Pixel" Noble | ce3ba4d | 2019-07-18 01:12:00 +0200 | [diff] [blame] | 70 | ) |
| 71 | |
Joshua Haberman | a345af9 | 2020-10-18 13:39:13 -0700 | [diff] [blame] | 72 | upb_fasttable_enabled( |
| 73 | name = "fasttable_enabled", |
Joshua Haberman | b928696 | 2020-10-26 21:23:16 -0700 | [diff] [blame] | 74 | build_setting_default = False, |
Joshua Haberman | a345af9 | 2020-10-18 13:39:13 -0700 | [diff] [blame] | 75 | visibility = ["//visibility:public"], |
| 76 | ) |
| 77 | |
Joshua Haberman | e8f9eac | 2020-10-28 22:50:03 -0700 | [diff] [blame] | 78 | config_setting( |
| 79 | name = "fasttable_enabled_setting", |
| 80 | flag_values = {"//:fasttable_enabled": "true"}, |
Protobuf Team Bot | 0f4fffe | 2022-11-04 14:25:29 -0700 | [diff] [blame] | 81 | visibility = ["//visibility:public"], |
Joshua Haberman | e8f9eac | 2020-10-28 22:50:03 -0700 | [diff] [blame] | 82 | ) |
| 83 | |
Joshua Haberman | a274ad7 | 2020-10-28 13:06:30 -0700 | [diff] [blame] | 84 | upb_proto_library_copts( |
| 85 | name = "upb_proto_library_copts__for_generated_code_only_do_not_use", |
| 86 | copts = UPB_DEFAULT_COPTS, |
| 87 | visibility = ["//visibility:public"], |
| 88 | ) |
| 89 | |
Protobuf Team Bot | a4779ef | 2022-11-04 18:33:20 -0700 | [diff] [blame] | 90 | # Please update copy.bara.sky target = ":friends" if |
| 91 | # you make changes to this list. |
Joshua Haberman | 6df5517 | 2022-05-24 11:41:56 -0700 | [diff] [blame] | 92 | package_group( |
| 93 | name = "friends", |
| 94 | packages = [], |
| 95 | ) |
| 96 | |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 97 | # Public C/C++ libraries ####################################################### |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 98 | |
| 99 | cc_library( |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 100 | name = "port", |
Joshua Haberman | a60e9a3 | 2022-05-13 17:32:17 -0700 | [diff] [blame] | 101 | hdrs = [ |
Eric Salo | f630787 | 2022-11-05 16:16:27 -0700 | [diff] [blame^] | 102 | "upb/port/vsnprintf_compat.h", |
Joshua Haberman | a60e9a3 | 2022-05-13 17:32:17 -0700 | [diff] [blame] | 103 | ], |
Joshua Haberman | 558315a | 2020-10-28 17:13:13 -0700 | [diff] [blame] | 104 | copts = UPB_DEFAULT_COPTS, |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 105 | textual_hdrs = [ |
Eric Salo | f630787 | 2022-11-05 16:16:27 -0700 | [diff] [blame^] | 106 | "upb/port/def.inc", |
| 107 | "upb/port/undef.inc", |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 108 | ], |
Matt Kulukundis | c49e6df | 2022-02-21 20:12:58 -0500 | [diff] [blame] | 109 | visibility = ["//:__subpackages__"], |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 110 | ) |
| 111 | |
| 112 | cc_library( |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 113 | name = "upb", |
| 114 | srcs = [ |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 115 | "upb/collections/map_sorter_internal.h", |
| 116 | "upb/collections/message_value.h", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 117 | "upb/internal/table.h", |
Eric Salo | 410143b | 2022-07-08 16:27:56 -0700 | [diff] [blame] | 118 | "upb/internal/unicode.h", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 119 | "upb/msg.c", |
Joshua Haberman | 3881393 | 2021-04-05 16:00:25 -0700 | [diff] [blame] | 120 | "upb/msg_internal.h", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 121 | "upb/status.c", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 122 | "upb/upb.c", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 123 | "upb/wire/decode.c", |
| 124 | "upb/wire/encode.c", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 125 | ], |
| 126 | hdrs = [ |
Protobuf Team Bot | 7b05f25 | 2022-06-22 09:18:12 -0700 | [diff] [blame] | 127 | "upb/alloc.h", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 128 | "upb/arena.h", |
Protobuf Team Bot | 8c44f04 | 2022-06-30 10:35:56 -0700 | [diff] [blame] | 129 | "upb/array.h", |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 130 | "upb/collections/array.h", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 131 | "upb/decode.h", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 132 | "upb/encode.h", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 133 | "upb/extension_registry.h", |
Eric Salo | f409c99 | 2022-11-03 15:48:59 +0000 | [diff] [blame] | 134 | "upb/mem/alloc.h", |
| 135 | "upb/mem/arena.h", |
Joshua Haberman | 1674f28 | 2021-04-04 18:43:24 -0700 | [diff] [blame] | 136 | "upb/msg.h", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 137 | "upb/status.h", |
Protobuf Team Bot | e153b52 | 2022-06-23 14:12:45 -0700 | [diff] [blame] | 138 | "upb/string_view.h", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 139 | "upb/upb.h", |
Joshua Haberman | 2559e78 | 2020-04-09 14:36:24 -0700 | [diff] [blame] | 140 | "upb/upb.hpp", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 141 | "upb/wire/decode.h", |
| 142 | "upb/wire/encode.h", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 143 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 144 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | ba29af3 | 2019-06-01 19:27:49 -0700 | [diff] [blame] | 145 | visibility = ["//visibility:public"], |
Joshua Haberman | efd576b | 2020-10-26 21:37:17 -0700 | [diff] [blame] | 146 | deps = [ |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 147 | ":collections_internal", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 148 | ":extension_registry", |
Joshua Haberman | efd576b | 2020-10-26 21:37:17 -0700 | [diff] [blame] | 149 | ":fastdecode", |
Eric Salo | f409c99 | 2022-11-03 15:48:59 +0000 | [diff] [blame] | 150 | ":mem", |
Joshua Haberman | efd576b | 2020-10-26 21:37:17 -0700 | [diff] [blame] | 151 | ":port", |
Protobuf Team Bot | 15596be | 2022-06-24 10:38:27 -0700 | [diff] [blame] | 152 | ":table_internal", |
Eric Salo | 410143b | 2022-07-08 16:27:56 -0700 | [diff] [blame] | 153 | ":unicode_internal", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 154 | ":wire_internal", |
Joshua Haberman | efd576b | 2020-10-26 21:37:17 -0700 | [diff] [blame] | 155 | ], |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 156 | ) |
| 157 | |
| 158 | cc_library( |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 159 | name = "extension_registry", |
| 160 | srcs = [ |
| 161 | "upb/extension_registry.c", |
| 162 | "upb/msg.h", |
| 163 | "upb/msg_internal.h", |
Protobuf Team Bot | e153b52 | 2022-06-23 14:12:45 -0700 | [diff] [blame] | 164 | "upb/string_view.h", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 165 | "upb/upb.h", |
| 166 | ], |
| 167 | hdrs = [ |
| 168 | "upb/extension_registry.h", |
| 169 | ], |
| 170 | copts = UPB_DEFAULT_COPTS, |
| 171 | visibility = ["//visibility:public"], |
| 172 | deps = [ |
Eric Salo | fd040a8 | 2022-11-04 22:08:16 -0700 | [diff] [blame] | 173 | ":collections_internal", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 174 | ":port", |
Protobuf Team Bot | 15596be | 2022-06-24 10:38:27 -0700 | [diff] [blame] | 175 | ":table_internal", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 176 | ], |
| 177 | ) |
| 178 | |
| 179 | cc_library( |
Joshua Haberman | 970c645 | 2022-03-08 17:44:06 -0800 | [diff] [blame] | 180 | name = "mini_table_internal", |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 181 | srcs = [ |
| 182 | "upb/mini_table/common.h", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 183 | "upb/msg_internal.h", |
| 184 | ], |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 185 | hdrs = [ |
| 186 | "upb/mini_table/common_internal.h", |
Eric Salo | d9b6f13 | 2022-11-03 11:35:20 -0700 | [diff] [blame] | 187 | "upb/mini_table/encode_internal.h", |
| 188 | "upb/mini_table/encode_internal.hpp", |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 189 | ], |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 190 | visibility = ["//:__subpackages__"], |
Joshua Haberman | 970c645 | 2022-03-08 17:44:06 -0800 | [diff] [blame] | 191 | deps = [ |
Eric Salo | fd040a8 | 2022-11-04 22:08:16 -0700 | [diff] [blame] | 192 | ":collections_internal", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 193 | ":extension_registry", |
Joshua Haberman | 970c645 | 2022-03-08 17:44:06 -0800 | [diff] [blame] | 194 | ":port", |
Protobuf Team Bot | 15596be | 2022-06-24 10:38:27 -0700 | [diff] [blame] | 195 | ":table_internal", |
Joshua Haberman | 970c645 | 2022-03-08 17:44:06 -0800 | [diff] [blame] | 196 | ":upb", |
| 197 | ], |
| 198 | ) |
| 199 | |
| 200 | cc_library( |
Joshua Haberman | 8ede0d5 | 2022-03-05 18:33:27 -0800 | [diff] [blame] | 201 | name = "mini_table", |
Protobuf Team | e5468b4 | 2022-04-19 14:09:14 -0700 | [diff] [blame] | 202 | srcs = [ |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 203 | "upb/mini_table/common.c", |
| 204 | "upb/mini_table/common.h", |
| 205 | "upb/mini_table/common_internal.h", |
| 206 | "upb/mini_table/decode.c", |
| 207 | "upb/mini_table/encode.c", |
Eric Salo | d9b6f13 | 2022-11-03 11:35:20 -0700 | [diff] [blame] | 208 | "upb/mini_table/encode_internal.h", |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 209 | "upb/msg_internal.h", |
Protobuf Team | e5468b4 | 2022-04-19 14:09:14 -0700 | [diff] [blame] | 210 | ], |
Joshua Haberman | 8ede0d5 | 2022-03-05 18:33:27 -0800 | [diff] [blame] | 211 | hdrs = [ |
| 212 | "upb/mini_table.h", |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 213 | "upb/mini_table/decode.h", |
Joshua Haberman | 8ede0d5 | 2022-03-05 18:33:27 -0800 | [diff] [blame] | 214 | ], |
| 215 | copts = UPB_DEFAULT_COPTS, |
| 216 | visibility = ["//visibility:public"], |
Joshua Haberman | 970c645 | 2022-03-08 17:44:06 -0800 | [diff] [blame] | 217 | deps = [ |
Eric Salo | fd040a8 | 2022-11-04 22:08:16 -0700 | [diff] [blame] | 218 | ":collections_internal", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 219 | ":extension_registry", |
Joshua Haberman | 970c645 | 2022-03-08 17:44:06 -0800 | [diff] [blame] | 220 | ":mini_table_internal", |
| 221 | ":port", |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 222 | ":table_internal", |
Joshua Haberman | 970c645 | 2022-03-08 17:44:06 -0800 | [diff] [blame] | 223 | ":upb", |
| 224 | ], |
Joshua Haberman | 8ede0d5 | 2022-03-05 18:33:27 -0800 | [diff] [blame] | 225 | ) |
| 226 | |
Protobuf Team | e5468b4 | 2022-04-19 14:09:14 -0700 | [diff] [blame] | 227 | cc_library( |
| 228 | name = "mini_table_accessors", |
| 229 | srcs = [ |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 230 | "upb/mini_table/accessors.c", |
| 231 | "upb/mini_table/common.h", |
| 232 | "upb/msg_internal.h", |
Protobuf Team | e5468b4 | 2022-04-19 14:09:14 -0700 | [diff] [blame] | 233 | ], |
| 234 | hdrs = [ |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 235 | "upb/mini_table/accessors.h", |
Protobuf Team | e5468b4 | 2022-04-19 14:09:14 -0700 | [diff] [blame] | 236 | ], |
| 237 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | 6df5517 | 2022-05-24 11:41:56 -0700 | [diff] [blame] | 238 | visibility = ["//visibility:public"], |
Protobuf Team | e5468b4 | 2022-04-19 14:09:14 -0700 | [diff] [blame] | 239 | deps = [ |
Protobuf Team | c7620a4 | 2022-04-29 13:21:20 -0700 | [diff] [blame] | 240 | ":collections", |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 241 | ":collections_internal", |
Protobuf Team | e5468b4 | 2022-04-19 14:09:14 -0700 | [diff] [blame] | 242 | ":mini_table", |
| 243 | ":mini_table_internal", |
| 244 | ":port", |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 245 | ":table_internal", |
Protobuf Team | e5468b4 | 2022-04-19 14:09:14 -0700 | [diff] [blame] | 246 | ":upb", |
| 247 | ], |
| 248 | ) |
| 249 | |
Joshua Haberman | 8ede0d5 | 2022-03-05 18:33:27 -0800 | [diff] [blame] | 250 | cc_test( |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 251 | name = "mini_table_encode_test", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 252 | srcs = [ |
| 253 | "upb/internal/table.h", |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 254 | "upb/mini_table/encode_test.cc", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 255 | ], |
Joshua Haberman | 8ede0d5 | 2022-03-05 18:33:27 -0800 | [diff] [blame] | 256 | deps = [ |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 257 | ":extension_registry", |
Joshua Haberman | 8ede0d5 | 2022-03-05 18:33:27 -0800 | [diff] [blame] | 258 | ":mini_table", |
Joshua Haberman | 970c645 | 2022-03-08 17:44:06 -0800 | [diff] [blame] | 259 | ":mini_table_internal", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 260 | ":port", |
Joshua Haberman | 970c645 | 2022-03-08 17:44:06 -0800 | [diff] [blame] | 261 | ":upb", |
Joshua Haberman | 8ede0d5 | 2022-03-05 18:33:27 -0800 | [diff] [blame] | 262 | "@com_google_absl//absl/container:flat_hash_set", |
Joshua Haberman | 970c645 | 2022-03-08 17:44:06 -0800 | [diff] [blame] | 263 | "@com_google_googletest//:gtest_main", |
Joshua Haberman | 8d148f0 | 2022-03-13 18:45:50 -0700 | [diff] [blame] | 264 | "@com_google_protobuf//:protobuf", |
Joshua Haberman | 8ede0d5 | 2022-03-05 18:33:27 -0800 | [diff] [blame] | 265 | ], |
| 266 | ) |
| 267 | |
Protobuf Team | e5468b4 | 2022-04-19 14:09:14 -0700 | [diff] [blame] | 268 | cc_test( |
| 269 | name = "mini_table_accessors_test", |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 270 | srcs = ["upb/mini_table/accessors_test.cc"], |
Protobuf Team | e5468b4 | 2022-04-19 14:09:14 -0700 | [diff] [blame] | 271 | deps = [ |
Protobuf Team | c7620a4 | 2022-04-29 13:21:20 -0700 | [diff] [blame] | 272 | ":collections", |
Protobuf Team | e5468b4 | 2022-04-19 14:09:14 -0700 | [diff] [blame] | 273 | ":mini_table", |
| 274 | ":mini_table_accessors", |
| 275 | ":mini_table_internal", |
| 276 | ":test_messages_proto2_proto_upb", |
| 277 | ":test_messages_proto3_proto_upb", |
Protobuf Team | 459059e | 2022-05-09 14:13:02 -0700 | [diff] [blame] | 278 | ":test_upb_proto", |
Protobuf Team | e5468b4 | 2022-04-19 14:09:14 -0700 | [diff] [blame] | 279 | ":upb", |
| 280 | "@com_google_absl//absl/container:flat_hash_set", |
| 281 | "@com_google_googletest//:gtest_main", |
| 282 | "@com_google_protobuf//:protobuf", |
| 283 | ], |
| 284 | ) |
| 285 | |
Joshua Haberman | 8ede0d5 | 2022-03-05 18:33:27 -0800 | [diff] [blame] | 286 | cc_library( |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 287 | name = "fastdecode", |
| 288 | srcs = [ |
Joshua Haberman | 3d437bb | 2021-10-13 09:53:36 -0700 | [diff] [blame] | 289 | "upb/decode.h", |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 290 | "upb/decode_fast.h", |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 291 | "upb/msg.h", |
Joshua Haberman | 3881393 | 2021-04-05 16:00:25 -0700 | [diff] [blame] | 292 | "upb/msg_internal.h", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 293 | "upb/wire/decode.h", |
| 294 | "upb/wire/decode_fast.c", |
| 295 | "upb/wire/decode_fast.h", |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 296 | ], |
Joshua Haberman | e86541a | 2020-10-28 17:53:09 -0700 | [diff] [blame] | 297 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | efd576b | 2020-10-26 21:37:17 -0700 | [diff] [blame] | 298 | deps = [ |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 299 | ":collections_internal", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 300 | ":extension_registry", |
Eric Salo | f409c99 | 2022-11-03 15:48:59 +0000 | [diff] [blame] | 301 | ":mem_internal", |
Joshua Haberman | efd576b | 2020-10-26 21:37:17 -0700 | [diff] [blame] | 302 | ":port", |
Protobuf Team Bot | 15596be | 2022-06-24 10:38:27 -0700 | [diff] [blame] | 303 | ":table_internal", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 304 | ":wire_internal", |
Joshua Haberman | efd576b | 2020-10-26 21:37:17 -0700 | [diff] [blame] | 305 | ], |
Joshua Haberman | ba29af3 | 2019-06-01 19:27:49 -0700 | [diff] [blame] | 306 | ) |
| 307 | |
| 308 | # Common support routines used by generated code. This library has no |
| 309 | # implementation, but depends on :upb and exposes a few more hdrs. |
| 310 | # |
| 311 | # This is public only because we have no way of visibility-limiting it to |
| 312 | # upb_proto_library() only. This interface is not stable and by using it you |
| 313 | # give up any backward compatibility guarantees. |
| 314 | cc_library( |
| 315 | name = "generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", |
Joshua Haberman | ba29af3 | 2019-06-01 19:27:49 -0700 | [diff] [blame] | 316 | hdrs = [ |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 317 | "upb/collections/array.h", |
| 318 | "upb/collections/array_internal.h", |
Eric Salo | fd040a8 | 2022-11-04 22:08:16 -0700 | [diff] [blame] | 319 | "upb/collections/map_gencode_util.h", |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 320 | "upb/collections/message_value.h", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 321 | "upb/extension_registry.h", |
Joshua Haberman | ba29af3 | 2019-06-01 19:27:49 -0700 | [diff] [blame] | 322 | "upb/msg.h", |
Joshua Haberman | 42bdfcb | 2021-04-06 09:25:28 -0700 | [diff] [blame] | 323 | "upb/msg_internal.h", |
Eric Salo | f630787 | 2022-11-05 16:16:27 -0700 | [diff] [blame^] | 324 | "upb/port/def.inc", |
| 325 | "upb/port/undef.inc", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 326 | "upb/wire/decode.h", |
| 327 | "upb/wire/decode_fast.h", |
| 328 | "upb/wire/encode.h", |
Joshua Haberman | ba29af3 | 2019-06-01 19:27:49 -0700 | [diff] [blame] | 329 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 330 | copts = UPB_DEFAULT_COPTS, |
Vishal Powar | 7031f77 | 2018-11-28 15:32:16 -0800 | [diff] [blame] | 331 | visibility = ["//visibility:public"], |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 332 | deps = [ |
Eric Salo | fd040a8 | 2022-11-04 22:08:16 -0700 | [diff] [blame] | 333 | ":collections_internal", |
Protobuf Team Bot | 15596be | 2022-06-24 10:38:27 -0700 | [diff] [blame] | 334 | ":table_internal", |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 335 | ":upb", |
| 336 | ], |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 337 | ) |
| 338 | |
Protobuf Team Bot | ff46379 | 2022-07-06 09:06:27 -0700 | [diff] [blame] | 339 | # Common support code for C++ generated code. |
| 340 | cc_library( |
| 341 | name = "generated_cpp_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", |
| 342 | hdrs = [ |
Protobuf Team Bot | ff46379 | 2022-07-06 09:06:27 -0700 | [diff] [blame] | 343 | "upb/msg.h", |
| 344 | "upb/msg_internal.h", |
Eric Salo | f630787 | 2022-11-05 16:16:27 -0700 | [diff] [blame^] | 345 | "upb/port/def.inc", |
| 346 | "upb/port/undef.inc", |
Protobuf Team Bot | ff46379 | 2022-07-06 09:06:27 -0700 | [diff] [blame] | 347 | "upb/upb.hpp", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 348 | "upb/wire/decode.h", |
| 349 | "upb/wire/decode_fast.h", |
| 350 | "upb/wire/encode.h", |
Protobuf Team Bot | ff46379 | 2022-07-06 09:06:27 -0700 | [diff] [blame] | 351 | ], |
| 352 | copts = UPB_DEFAULT_COPTS, |
| 353 | visibility = ["//visibility:public"], |
| 354 | deps = [ |
Eric Salo | fd040a8 | 2022-11-04 22:08:16 -0700 | [diff] [blame] | 355 | ":collections_internal", |
Protobuf Team Bot | ff46379 | 2022-07-06 09:06:27 -0700 | [diff] [blame] | 356 | ":mini_table", |
| 357 | ":table_internal", |
| 358 | ":upb", |
| 359 | ], |
| 360 | ) |
| 361 | |
Joshua Haberman | 8c530f9 | 2022-02-22 14:50:55 -0800 | [diff] [blame] | 362 | cc_library( |
| 363 | name = "generated_reflection_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", |
Eric Salo | edecfd5 | 2022-09-15 10:26:14 -0700 | [diff] [blame] | 364 | srcs = [ |
| 365 | "upb/reflection/common.h", |
| 366 | "upb/reflection/def_pool.h", |
| 367 | "upb/reflection/def_type.h", |
| 368 | "upb/reflection/enum_def.h", |
| 369 | "upb/reflection/enum_value_def.h", |
| 370 | "upb/reflection/extension_range.h", |
| 371 | "upb/reflection/field_def.h", |
| 372 | "upb/reflection/file_def.h", |
| 373 | "upb/reflection/message_def.h", |
| 374 | "upb/reflection/method_def.h", |
| 375 | "upb/reflection/oneof_def.h", |
| 376 | "upb/reflection/service_def.h", |
| 377 | ], |
Joshua Haberman | 8c530f9 | 2022-02-22 14:50:55 -0800 | [diff] [blame] | 378 | hdrs = [ |
Eric Salo | f630787 | 2022-11-05 16:16:27 -0700 | [diff] [blame^] | 379 | "upb/port/def.inc", |
| 380 | "upb/port/undef.inc", |
Eric Salo | edecfd5 | 2022-09-15 10:26:14 -0700 | [diff] [blame] | 381 | "upb/reflection/def.h", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 382 | "upb/reflection/def_pool_internal.h", |
Joshua Haberman | 8c530f9 | 2022-02-22 14:50:55 -0800 | [diff] [blame] | 383 | ], |
| 384 | copts = UPB_DEFAULT_COPTS, |
| 385 | visibility = ["//visibility:public"], |
| 386 | deps = [ |
Eric Salo | edecfd5 | 2022-09-15 10:26:14 -0700 | [diff] [blame] | 387 | ":descriptor_upb_proto", |
Joshua Haberman | 8c530f9 | 2022-02-22 14:50:55 -0800 | [diff] [blame] | 388 | ":reflection", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 389 | ":reflection_internal", |
Eric Salo | edecfd5 | 2022-09-15 10:26:14 -0700 | [diff] [blame] | 390 | ":table_internal", |
Joshua Haberman | 8c530f9 | 2022-02-22 14:50:55 -0800 | [diff] [blame] | 391 | ], |
| 392 | ) |
| 393 | |
Josh Haberman | cd9e1e6 | 2019-04-17 15:23:00 -0700 | [diff] [blame] | 394 | upb_proto_library( |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 395 | name = "descriptor_upb_proto", |
| 396 | visibility = ["//visibility:public"], |
| 397 | deps = ["@com_google_protobuf//:descriptor_proto"], |
| 398 | ) |
| 399 | |
| 400 | upb_proto_reflection_library( |
| 401 | name = "descriptor_upb_proto_reflection", |
Joshua Haberman | c58541e | 2019-05-15 09:49:29 -0700 | [diff] [blame] | 402 | visibility = ["//visibility:public"], |
Google-Autofuzz | 8f19667 | 2019-06-25 20:14:14 -0400 | [diff] [blame] | 403 | deps = ["@com_google_protobuf//:descriptor_proto"], |
Josh Haberman | cd9e1e6 | 2019-04-17 15:23:00 -0700 | [diff] [blame] | 404 | ) |
| 405 | |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 406 | cc_library( |
Protobuf Team | 823ed18 | 2022-04-28 16:07:14 -0700 | [diff] [blame] | 407 | name = "collections", |
| 408 | srcs = [ |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 409 | "upb/collections/array.c", |
| 410 | "upb/collections/array_internal.h", |
| 411 | "upb/collections/map.c", |
Eric Salo | fd040a8 | 2022-11-04 22:08:16 -0700 | [diff] [blame] | 412 | "upb/collections/map_internal.h", |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 413 | "upb/collections/map_sorter.c", |
| 414 | "upb/collections/message_value.h", |
| 415 | "upb/extension_registry.h", |
| 416 | "upb/msg.h", |
Protobuf Team Bot | 7975945 | 2022-06-23 16:51:15 -0700 | [diff] [blame] | 417 | "upb/msg_internal.h", |
Protobuf Team | 823ed18 | 2022-04-28 16:07:14 -0700 | [diff] [blame] | 418 | ], |
| 419 | hdrs = [ |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 420 | "upb/array.h", |
Protobuf Team | 823ed18 | 2022-04-28 16:07:14 -0700 | [diff] [blame] | 421 | "upb/collections.h", |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 422 | "upb/collections/array.h", |
| 423 | "upb/collections/map.h", |
| 424 | "upb/collections/map_sorter_internal.h", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 425 | "upb/map.h", |
Protobuf Team | 823ed18 | 2022-04-28 16:07:14 -0700 | [diff] [blame] | 426 | ], |
| 427 | copts = UPB_DEFAULT_COPTS, |
| 428 | visibility = ["//visibility:public"], |
| 429 | deps = [ |
Protobuf Team | 823ed18 | 2022-04-28 16:07:14 -0700 | [diff] [blame] | 430 | ":port", |
Protobuf Team Bot | 15596be | 2022-06-24 10:38:27 -0700 | [diff] [blame] | 431 | ":table_internal", |
Protobuf Team | 823ed18 | 2022-04-28 16:07:14 -0700 | [diff] [blame] | 432 | ], |
| 433 | ) |
| 434 | |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 435 | # TODO(b/232091617): Once we can delete the deprecated forwarding headers |
| 436 | # (= everything in upb/) we can move this build target down into reflection/ |
Protobuf Team | 823ed18 | 2022-04-28 16:07:14 -0700 | [diff] [blame] | 437 | cc_library( |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 438 | name = "reflection", |
| 439 | srcs = [ |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 440 | "upb/reflection/common.h", |
| 441 | "upb/reflection/def_builder.c", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 442 | "upb/reflection/def_builder_internal.h", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 443 | "upb/reflection/def_pool.c", |
| 444 | "upb/reflection/def_pool.h", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 445 | "upb/reflection/def_pool_internal.h", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 446 | "upb/reflection/def_type.c", |
| 447 | "upb/reflection/def_type.h", |
Eric Salo | b8bec58 | 2022-09-30 11:22:10 -0700 | [diff] [blame] | 448 | "upb/reflection/desc_state.c", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 449 | "upb/reflection/desc_state_internal.h", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 450 | "upb/reflection/enum_def.c", |
| 451 | "upb/reflection/enum_def.h", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 452 | "upb/reflection/enum_def_internal.h", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 453 | "upb/reflection/enum_value_def.c", |
| 454 | "upb/reflection/enum_value_def.h", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 455 | "upb/reflection/enum_value_def_internal.h", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 456 | "upb/reflection/extension_range.c", |
| 457 | "upb/reflection/extension_range.h", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 458 | "upb/reflection/extension_range_internal.h", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 459 | "upb/reflection/field_def.c", |
| 460 | "upb/reflection/field_def.h", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 461 | "upb/reflection/field_def_internal.h", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 462 | "upb/reflection/file_def.c", |
| 463 | "upb/reflection/file_def.h", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 464 | "upb/reflection/file_def_internal.h", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 465 | "upb/reflection/message.c", |
| 466 | "upb/reflection/message_def.c", |
| 467 | "upb/reflection/message_def.h", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 468 | "upb/reflection/message_def_internal.h", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 469 | "upb/reflection/method_def.c", |
| 470 | "upb/reflection/method_def.h", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 471 | "upb/reflection/method_def_internal.h", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 472 | "upb/reflection/oneof_def.c", |
| 473 | "upb/reflection/oneof_def.h", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 474 | "upb/reflection/oneof_def_internal.h", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 475 | "upb/reflection/service_def.c", |
| 476 | "upb/reflection/service_def.h", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 477 | "upb/reflection/service_def_internal.h", |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 478 | ], |
| 479 | hdrs = [ |
| 480 | "upb/def.h", |
Joshua Haberman | 2559e78 | 2020-04-09 14:36:24 -0700 | [diff] [blame] | 481 | "upb/def.hpp", |
Joshua Haberman | 9a360ad | 2019-11-12 08:08:46 -0800 | [diff] [blame] | 482 | "upb/reflection.h", |
Joshua Haberman | 5e550e8 | 2021-01-09 15:45:44 -0800 | [diff] [blame] | 483 | "upb/reflection.hpp", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 484 | "upb/reflection/def.h", |
| 485 | "upb/reflection/def.hpp", |
| 486 | "upb/reflection/message.h", |
| 487 | "upb/reflection/message.hpp", |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 488 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 489 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 490 | visibility = ["//visibility:public"], |
Josh Haberman | cd9e1e6 | 2019-04-17 15:23:00 -0700 | [diff] [blame] | 491 | deps = [ |
Protobuf Team | 823ed18 | 2022-04-28 16:07:14 -0700 | [diff] [blame] | 492 | ":collections", |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 493 | ":descriptor_upb_proto", |
Joshua Haberman | fa8b605 | 2022-04-19 13:15:55 -0700 | [diff] [blame] | 494 | ":mini_table", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 495 | ":mini_table_internal", |
Anna R | fc49411 | 2020-01-09 14:16:25 -0800 | [diff] [blame] | 496 | ":port", |
Protobuf Team Bot | 15596be | 2022-06-24 10:38:27 -0700 | [diff] [blame] | 497 | ":table_internal", |
Joshua Haberman | 9a66356 | 2019-05-13 16:13:39 -0700 | [diff] [blame] | 498 | ":upb", |
Josh Haberman | cd9e1e6 | 2019-04-17 15:23:00 -0700 | [diff] [blame] | 499 | ], |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 500 | ) |
| 501 | |
Joshua Haberman | ce1a399 | 2020-02-04 06:22:09 -0800 | [diff] [blame] | 502 | cc_library( |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 503 | name = "reflection_internal", |
| 504 | srcs = [ |
| 505 | "upb/reflection/common.h", |
| 506 | "upb/reflection/def_builder_internal.h", |
| 507 | "upb/reflection/def_pool.h", |
| 508 | "upb/reflection/def_type.h", |
| 509 | "upb/reflection/desc_state_internal.h", |
| 510 | "upb/reflection/enum_def.h", |
| 511 | "upb/reflection/enum_value_def.h", |
| 512 | "upb/reflection/extension_range.h", |
| 513 | "upb/reflection/field_def.h", |
| 514 | "upb/reflection/file_def.h", |
| 515 | "upb/reflection/message.h", |
| 516 | "upb/reflection/message_def.h", |
| 517 | "upb/reflection/method_def.h", |
| 518 | "upb/reflection/oneof_def.h", |
| 519 | "upb/reflection/service_def.h", |
| 520 | ], |
| 521 | hdrs = [ |
| 522 | "upb/reflection/def_pool_internal.h", |
| 523 | "upb/reflection/enum_def_internal.h", |
| 524 | "upb/reflection/enum_value_def_internal.h", |
| 525 | "upb/reflection/extension_range_internal.h", |
| 526 | "upb/reflection/field_def_internal.h", |
| 527 | "upb/reflection/file_def_internal.h", |
| 528 | "upb/reflection/message_def_internal.h", |
| 529 | "upb/reflection/method_def_internal.h", |
| 530 | "upb/reflection/oneof_def_internal.h", |
| 531 | "upb/reflection/service_def_internal.h", |
| 532 | ], |
| 533 | copts = UPB_DEFAULT_COPTS, |
| 534 | visibility = ["//visibility:public"], |
| 535 | deps = [ |
| 536 | ":collections", |
| 537 | ":descriptor_upb_proto", |
| 538 | ":mini_table", |
| 539 | ":mini_table_internal", |
| 540 | ":port", |
| 541 | ":reflection", |
| 542 | ":table_internal", |
| 543 | ":upb", |
| 544 | ], |
| 545 | ) |
| 546 | |
| 547 | cc_library( |
Joshua Haberman | ce1a399 | 2020-02-04 06:22:09 -0800 | [diff] [blame] | 548 | name = "textformat", |
| 549 | srcs = [ |
Eric Salo | 0bb4663 | 2022-11-03 10:33:57 -0700 | [diff] [blame] | 550 | "upb/text/encode.c", |
Joshua Haberman | ce1a399 | 2020-02-04 06:22:09 -0800 | [diff] [blame] | 551 | ], |
| 552 | hdrs = [ |
Eric Salo | 0bb4663 | 2022-11-03 10:33:57 -0700 | [diff] [blame] | 553 | "upb/text/encode.h", |
Joshua Haberman | 02c89a8 | 2020-02-10 14:56:27 -0800 | [diff] [blame] | 554 | "upb/text_encode.h", |
Joshua Haberman | ce1a399 | 2020-02-04 06:22:09 -0800 | [diff] [blame] | 555 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 556 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | ce1a399 | 2020-02-04 06:22:09 -0800 | [diff] [blame] | 557 | visibility = ["//visibility:public"], |
| 558 | deps = [ |
Eric Salo | 85534bb | 2022-09-06 21:04:59 -0700 | [diff] [blame] | 559 | ":collections", |
Joshua Haberman | 4b8c04e | 2020-02-18 16:50:25 -0800 | [diff] [blame] | 560 | ":port", |
Joshua Haberman | ce1a399 | 2020-02-04 06:22:09 -0800 | [diff] [blame] | 561 | ":reflection", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 562 | ":wire_internal", |
Joshua Haberman | ce1a399 | 2020-02-04 06:22:09 -0800 | [diff] [blame] | 563 | ], |
| 564 | ) |
| 565 | |
Eric Salo | 8cc3e07 | 2022-09-25 20:19:42 -0700 | [diff] [blame] | 566 | # TODO(b/232091617): Once we can delete the deprecated forwarding headers |
| 567 | # (= everything in upb/) we can move this build target down into json/ |
Joshua Haberman | 6e9db7d | 2020-02-15 19:31:51 -0800 | [diff] [blame] | 568 | cc_library( |
| 569 | name = "json", |
| 570 | srcs = [ |
Eric Salo | 8cc3e07 | 2022-09-25 20:19:42 -0700 | [diff] [blame] | 571 | "upb/json/decode.c", |
| 572 | "upb/json/encode.c", |
Joshua Haberman | 6e9db7d | 2020-02-15 19:31:51 -0800 | [diff] [blame] | 573 | ], |
| 574 | hdrs = [ |
Eric Salo | 8cc3e07 | 2022-09-25 20:19:42 -0700 | [diff] [blame] | 575 | "upb/json/decode.h", |
| 576 | "upb/json/encode.h", |
Joshua Haberman | d49c1db | 2020-02-23 19:49:39 -0800 | [diff] [blame] | 577 | "upb/json_decode.h", |
Joshua Haberman | 6e9db7d | 2020-02-15 19:31:51 -0800 | [diff] [blame] | 578 | "upb/json_encode.h", |
| 579 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 580 | copts = UPB_DEFAULT_COPTS, |
Lidi Zheng | f72c26c | 2020-12-10 16:23:08 -0800 | [diff] [blame] | 581 | visibility = ["//visibility:public"], |
Joshua Haberman | 6e9db7d | 2020-02-15 19:31:51 -0800 | [diff] [blame] | 582 | deps = [ |
Eric Salo | c67021f | 2022-08-23 11:21:55 -0700 | [diff] [blame] | 583 | ":atoi_internal", |
Eric Salo | 85534bb | 2022-09-06 21:04:59 -0700 | [diff] [blame] | 584 | ":collections", |
Joshua Haberman | 4b8c04e | 2020-02-18 16:50:25 -0800 | [diff] [blame] | 585 | ":port", |
Joshua Haberman | 6e9db7d | 2020-02-15 19:31:51 -0800 | [diff] [blame] | 586 | ":reflection", |
Eric Salo | 410143b | 2022-07-08 16:27:56 -0700 | [diff] [blame] | 587 | ":unicode_internal", |
Joshua Haberman | 4b8c04e | 2020-02-18 16:50:25 -0800 | [diff] [blame] | 588 | ":upb", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 589 | ":wire_internal", |
Joshua Haberman | 6e9db7d | 2020-02-15 19:31:51 -0800 | [diff] [blame] | 590 | ], |
| 591 | ) |
| 592 | |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 593 | # Tests ######################################################################## |
| 594 | |
| 595 | cc_test( |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 596 | name = "def_builder_test", |
| 597 | srcs = [ |
| 598 | "upb/reflection/common.h", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 599 | "upb/reflection/def_builder_internal.h", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 600 | "upb/reflection/def_builder_test.cc", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 601 | "upb/reflection/def_type.h", |
| 602 | ], |
| 603 | deps = [ |
| 604 | ":descriptor_upb_proto", |
| 605 | ":port", |
| 606 | ":reflection", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 607 | ":reflection_internal", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 608 | ":table_internal", |
| 609 | ":upb", |
| 610 | "@com_google_googletest//:gtest_main", |
| 611 | ], |
| 612 | ) |
| 613 | |
| 614 | cc_test( |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 615 | name = "test_generated_code", |
| 616 | srcs = ["upb/test_generated_code.cc"], |
| 617 | deps = [ |
| 618 | ":empty_upbdefs_proto", |
Joshua Haberman | 1cf8214 | 2022-05-12 13:57:50 -0700 | [diff] [blame] | 619 | ":port", |
Protobuf Team | bef5368 | 2022-04-04 11:18:39 -0700 | [diff] [blame] | 620 | ":test_messages_proto2_proto_upb", |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 621 | ":test_messages_proto3_proto_upb", |
| 622 | ":test_upb_proto", |
Matt Kulukundis | edd1dd3 | 2022-02-20 17:44:27 -0500 | [diff] [blame] | 623 | ":upb", |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 624 | "@com_google_googletest//:gtest_main", |
| 625 | ], |
| 626 | ) |
| 627 | |
| 628 | proto_library( |
| 629 | name = "test_proto", |
| 630 | testonly = 1, |
| 631 | srcs = ["upb/test.proto"], |
| 632 | ) |
| 633 | |
| 634 | upb_proto_library( |
| 635 | name = "test_upb_proto", |
| 636 | testonly = 1, |
| 637 | deps = [":test_proto"], |
| 638 | ) |
| 639 | |
| 640 | proto_library( |
| 641 | name = "empty_proto", |
| 642 | srcs = ["upb/empty.proto"], |
| 643 | ) |
| 644 | |
| 645 | upb_proto_reflection_library( |
| 646 | name = "empty_upbdefs_proto", |
| 647 | testonly = 1, |
| 648 | deps = [":empty_proto"], |
| 649 | ) |
| 650 | |
| 651 | upb_proto_library( |
Protobuf Team | bef5368 | 2022-04-04 11:18:39 -0700 | [diff] [blame] | 652 | name = "test_messages_proto2_proto_upb", |
| 653 | testonly = 1, |
Protobuf Team Bot | 04363f7 | 2022-10-07 11:49:51 -0700 | [diff] [blame] | 654 | deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto2_proto"], |
Protobuf Team | bef5368 | 2022-04-04 11:18:39 -0700 | [diff] [blame] | 655 | ) |
| 656 | |
| 657 | upb_proto_library( |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 658 | name = "test_messages_proto3_proto_upb", |
| 659 | testonly = 1, |
Protobuf Team Bot | 04363f7 | 2022-10-07 11:49:51 -0700 | [diff] [blame] | 660 | deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto3_proto"], |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 661 | ) |
Matt Kulukundis | 61b0905 | 2022-02-19 19:35:58 -0500 | [diff] [blame] | 662 | |
Protobuf Team Bot | 6e1aa9f | 2022-06-08 11:17:20 -0700 | [diff] [blame] | 663 | proto_library( |
| 664 | name = "json_test_proto", |
| 665 | testonly = 1, |
Eric Salo | 8cc3e07 | 2022-09-25 20:19:42 -0700 | [diff] [blame] | 666 | srcs = ["upb/json/test.proto"], |
Protobuf Team Bot | 6e1aa9f | 2022-06-08 11:17:20 -0700 | [diff] [blame] | 667 | deps = ["@com_google_protobuf//:struct_proto"], |
| 668 | ) |
| 669 | |
| 670 | upb_proto_library( |
| 671 | name = "json_test_upb_proto", |
| 672 | testonly = 1, |
| 673 | deps = [":json_test_proto"], |
| 674 | ) |
| 675 | |
| 676 | upb_proto_reflection_library( |
| 677 | name = "json_test_upb_proto_reflection", |
| 678 | testonly = 1, |
| 679 | deps = [":json_test_proto"], |
| 680 | ) |
| 681 | |
| 682 | cc_test( |
Eric Salo | 4215bc8 | 2022-09-07 14:21:18 -0700 | [diff] [blame] | 683 | name = "json_decode_test", |
Eric Salo | 8cc3e07 | 2022-09-25 20:19:42 -0700 | [diff] [blame] | 684 | srcs = ["upb/json/decode_test.cc"], |
Eric Salo | 4215bc8 | 2022-09-07 14:21:18 -0700 | [diff] [blame] | 685 | deps = [ |
| 686 | ":json", |
| 687 | ":json_test_upb_proto", |
| 688 | ":json_test_upb_proto_reflection", |
| 689 | ":reflection", |
| 690 | ":struct_upb_proto", |
| 691 | ":upb", |
| 692 | "@com_google_googletest//:gtest_main", |
| 693 | ], |
| 694 | ) |
| 695 | |
| 696 | cc_test( |
| 697 | name = "json_encode_test", |
Eric Salo | 8cc3e07 | 2022-09-25 20:19:42 -0700 | [diff] [blame] | 698 | srcs = ["upb/json/encode_test.cc"], |
Protobuf Team Bot | 6e1aa9f | 2022-06-08 11:17:20 -0700 | [diff] [blame] | 699 | deps = [ |
| 700 | ":json", |
| 701 | ":json_test_upb_proto", |
| 702 | ":json_test_upb_proto_reflection", |
| 703 | ":reflection", |
| 704 | ":struct_upb_proto", |
| 705 | ":upb", |
| 706 | "@com_google_googletest//:gtest_main", |
| 707 | ], |
| 708 | ) |
| 709 | |
Joshua Haberman | ce012b7 | 2021-10-01 16:34:42 -0700 | [diff] [blame] | 710 | cc_test( |
| 711 | name = "msg_test", |
| 712 | srcs = ["upb/msg_test.cc"], |
| 713 | deps = [ |
Joshua Haberman | 125db89 | 2022-06-30 09:07:48 -0700 | [diff] [blame] | 714 | ":fuzz_test_util", |
Joshua Haberman | ce012b7 | 2021-10-01 16:34:42 -0700 | [diff] [blame] | 715 | ":json", |
Matt Kulukundis | a3bd5f8 | 2022-02-21 23:47:27 -0500 | [diff] [blame] | 716 | ":msg_test_upb_proto", |
Matt Kulukundis | 61b0905 | 2022-02-19 19:35:58 -0500 | [diff] [blame] | 717 | ":msg_test_upb_proto_reflection", |
Matt Kulukundis | a3bd5f8 | 2022-02-21 23:47:27 -0500 | [diff] [blame] | 718 | ":reflection", |
Matt Kulukundis | 42c121e | 2022-02-21 23:58:17 -0500 | [diff] [blame] | 719 | ":test_messages_proto3_proto_upb", |
Matt Kulukundis | a3bd5f8 | 2022-02-21 23:47:27 -0500 | [diff] [blame] | 720 | ":upb", |
Matt Kulukundis | 61b0905 | 2022-02-19 19:35:58 -0500 | [diff] [blame] | 721 | "@com_google_googletest//:gtest_main", |
Joshua Haberman | ce012b7 | 2021-10-01 16:34:42 -0700 | [diff] [blame] | 722 | ], |
| 723 | ) |
| 724 | |
| 725 | proto_library( |
| 726 | name = "msg_test_proto", |
Matt Kulukundis | 61b0905 | 2022-02-19 19:35:58 -0500 | [diff] [blame] | 727 | testonly = 1, |
Joshua Haberman | ce012b7 | 2021-10-01 16:34:42 -0700 | [diff] [blame] | 728 | srcs = ["upb/msg_test.proto"], |
Protobuf Team Bot | 04363f7 | 2022-10-07 11:49:51 -0700 | [diff] [blame] | 729 | deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto3_proto"], |
Joshua Haberman | ce012b7 | 2021-10-01 16:34:42 -0700 | [diff] [blame] | 730 | ) |
| 731 | |
Matt Kulukundis | a3bd5f8 | 2022-02-21 23:47:27 -0500 | [diff] [blame] | 732 | upb_proto_library( |
| 733 | name = "msg_test_upb_proto", |
| 734 | testonly = 1, |
| 735 | deps = [":msg_test_proto"], |
| 736 | ) |
| 737 | |
Eric Salo | 0f585c6 | 2022-10-03 09:36:17 -0700 | [diff] [blame] | 738 | proto_library( |
| 739 | name = "proto3_test_proto", |
| 740 | testonly = 1, |
| 741 | srcs = ["upb/proto3_test.proto"], |
| 742 | deps = ["@com_google_protobuf//:descriptor_proto"], |
| 743 | ) |
| 744 | |
| 745 | upb_proto_library( |
| 746 | name = "proto3_test_upb_proto", |
| 747 | testonly = 1, |
| 748 | deps = [":proto3_test_proto"], |
| 749 | ) |
| 750 | |
| 751 | upb_proto_reflection_library( |
| 752 | name = "proto3_test_upb_proto_reflection", |
| 753 | testonly = 1, |
| 754 | deps = [":proto3_test_proto"], |
| 755 | ) |
| 756 | |
Joshua Haberman | ce012b7 | 2021-10-01 16:34:42 -0700 | [diff] [blame] | 757 | upb_proto_reflection_library( |
| 758 | name = "msg_test_upb_proto_reflection", |
Matt Kulukundis | 61b0905 | 2022-02-19 19:35:58 -0500 | [diff] [blame] | 759 | testonly = 1, |
Joshua Haberman | ce012b7 | 2021-10-01 16:34:42 -0700 | [diff] [blame] | 760 | deps = [":msg_test_proto"], |
| 761 | ) |
| 762 | |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 763 | proto_library( |
| 764 | name = "test_cpp_proto", |
| 765 | srcs = ["upb/test_cpp.proto"], |
Matt Kulukundis | 61b0905 | 2022-02-19 19:35:58 -0500 | [diff] [blame] | 766 | deps = ["@com_google_protobuf//:timestamp_proto"], |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 767 | ) |
| 768 | |
| 769 | upb_proto_library( |
| 770 | name = "test_cpp_upb_proto", |
| 771 | deps = ["test_cpp_proto"], |
| 772 | ) |
| 773 | |
| 774 | upb_proto_reflection_library( |
| 775 | name = "test_cpp_upb_proto_reflection", |
| 776 | deps = ["test_cpp_proto"], |
| 777 | ) |
| 778 | |
Matt Kulukundis | 92d71a4 | 2022-02-20 15:20:48 -0500 | [diff] [blame] | 779 | upb_proto_library( |
Protobuf Team Bot | 6e1aa9f | 2022-06-08 11:17:20 -0700 | [diff] [blame] | 780 | name = "struct_upb_proto", |
| 781 | deps = ["@com_google_protobuf//:struct_proto"], |
| 782 | ) |
| 783 | |
| 784 | upb_proto_library( |
Matt Kulukundis | 92d71a4 | 2022-02-20 15:20:48 -0500 | [diff] [blame] | 785 | name = "timestamp_upb_proto", |
| 786 | deps = ["@com_google_protobuf//:timestamp_proto"], |
| 787 | ) |
| 788 | |
| 789 | upb_proto_reflection_library( |
| 790 | name = "timestamp_upb_proto_reflection", |
| 791 | deps = ["@com_google_protobuf//:timestamp_proto"], |
| 792 | ) |
| 793 | |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 794 | cc_test( |
Eric Salo | c67021f | 2022-08-23 11:21:55 -0700 | [diff] [blame] | 795 | name = "atoi_test", |
| 796 | srcs = ["upb/internal/atoi_test.cc"], |
| 797 | copts = UPB_DEFAULT_CPPOPTS, |
| 798 | deps = [ |
| 799 | ":atoi_internal", |
| 800 | "@com_google_absl//absl/strings", |
| 801 | "@com_google_googletest//:gtest_main", |
| 802 | ], |
| 803 | ) |
| 804 | |
| 805 | cc_test( |
Eric Salo | 0f585c6 | 2022-10-03 09:36:17 -0700 | [diff] [blame] | 806 | name = "proto3_test", |
| 807 | srcs = ["upb/proto3_test.cc"], |
| 808 | copts = UPB_DEFAULT_CPPOPTS, |
| 809 | deps = [ |
| 810 | ":proto3_test_upb_proto", |
| 811 | ":proto3_test_upb_proto_reflection", |
| 812 | ":reflection", |
| 813 | "@com_google_googletest//:gtest_main", |
| 814 | ], |
| 815 | ) |
| 816 | |
| 817 | cc_test( |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 818 | name = "test_cpp", |
| 819 | srcs = ["upb/test_cpp.cc"], |
| 820 | copts = UPB_DEFAULT_CPPOPTS, |
| 821 | deps = [ |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 822 | ":json", |
| 823 | ":port", |
| 824 | ":reflection", |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 825 | ":test_cpp_upb_proto", |
| 826 | ":test_cpp_upb_proto_reflection", |
Matt Kulukundis | 92d71a4 | 2022-02-20 15:20:48 -0500 | [diff] [blame] | 827 | ":timestamp_upb_proto", |
| 828 | ":timestamp_upb_proto_reflection", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 829 | ":upb", |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 830 | "@com_google_googletest//:gtest_main", |
| 831 | ], |
| 832 | ) |
| 833 | |
| 834 | cc_test( |
| 835 | name = "test_table", |
| 836 | srcs = ["upb/test_table.cc"], |
| 837 | copts = UPB_DEFAULT_CPPOPTS, |
| 838 | deps = [ |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 839 | ":port", |
| 840 | ":table_internal", |
| 841 | ":upb", |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 842 | "@com_google_googletest//:gtest_main", |
| 843 | ], |
| 844 | ) |
| 845 | |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 846 | upb_proto_library( |
| 847 | name = "conformance_proto_upb", |
| 848 | testonly = 1, |
Joshua Haberman | 32f45b5 | 2022-05-09 22:00:33 -0700 | [diff] [blame] | 849 | deps = ["@com_google_protobuf//conformance:conformance_proto"], |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 850 | ) |
| 851 | |
| 852 | upb_proto_reflection_library( |
| 853 | name = "conformance_proto_upbdefs", |
| 854 | testonly = 1, |
Joshua Haberman | 32f45b5 | 2022-05-09 22:00:33 -0700 | [diff] [blame] | 855 | deps = ["@com_google_protobuf//conformance:conformance_proto"], |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 856 | ) |
| 857 | |
| 858 | upb_proto_reflection_library( |
| 859 | name = "test_messages_proto2_upbdefs", |
| 860 | testonly = 1, |
Protobuf Team Bot | 04363f7 | 2022-10-07 11:49:51 -0700 | [diff] [blame] | 861 | deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto2_proto"], |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 862 | ) |
| 863 | |
| 864 | upb_proto_reflection_library( |
| 865 | name = "test_messages_proto3_upbdefs", |
| 866 | testonly = 1, |
Protobuf Team Bot | 04363f7 | 2022-10-07 11:49:51 -0700 | [diff] [blame] | 867 | deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto3_proto"], |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 868 | ) |
| 869 | |
| 870 | cc_binary( |
| 871 | name = "conformance_upb", |
| 872 | testonly = 1, |
| 873 | srcs = ["upb/conformance_upb.c"], |
| 874 | copts = UPB_DEFAULT_COPTS, |
| 875 | data = ["upb/conformance_upb_failures.txt"], |
| 876 | deps = [ |
| 877 | ":conformance_proto_upb", |
| 878 | ":conformance_proto_upbdefs", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 879 | ":json", |
| 880 | ":port", |
| 881 | ":reflection", |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 882 | ":test_messages_proto2_upbdefs", |
| 883 | ":test_messages_proto3_upbdefs", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 884 | ":textformat", |
| 885 | ":upb", |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 886 | ], |
| 887 | ) |
| 888 | |
| 889 | make_shell_script( |
| 890 | name = "gen_test_conformance_upb", |
| 891 | out = "test_conformance_upb.sh", |
Joshua Haberman | 32f45b5 | 2022-05-09 22:00:33 -0700 | [diff] [blame] | 892 | contents = "external/com_google_protobuf/conformance/conformance_test_runner " + |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 893 | " --enforce_recommended " + |
| 894 | " --failure_list ./upb/conformance_upb_failures.txt" + |
| 895 | " ./conformance_upb", |
| 896 | ) |
| 897 | |
| 898 | sh_test( |
| 899 | name = "test_conformance_upb", |
| 900 | srcs = ["test_conformance_upb.sh"], |
| 901 | data = [ |
| 902 | "upb/conformance_upb_failures.txt", |
| 903 | ":conformance_upb", |
Joshua Haberman | 32f45b5 | 2022-05-09 22:00:33 -0700 | [diff] [blame] | 904 | "@com_google_protobuf//conformance:conformance_test_runner", |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 905 | ], |
| 906 | deps = ["@bazel_tools//tools/bash/runfiles"], |
| 907 | ) |
| 908 | |
Joshua Haberman | 50c1298 | 2022-03-08 15:52:37 -0800 | [diff] [blame] | 909 | cc_binary( |
| 910 | name = "conformance_upb_dynamic_minitable", |
| 911 | testonly = 1, |
| 912 | srcs = ["upb/conformance_upb.c"], |
| 913 | copts = UPB_DEFAULT_COPTS + [ |
Joshua Haberman | 970c645 | 2022-03-08 17:44:06 -0800 | [diff] [blame] | 914 | "-DREBUILD_MINITABLES", |
Joshua Haberman | 50c1298 | 2022-03-08 15:52:37 -0800 | [diff] [blame] | 915 | ], |
| 916 | data = ["upb/conformance_upb_failures.txt"], |
| 917 | deps = [ |
| 918 | ":conformance_proto_upb", |
| 919 | ":conformance_proto_upbdefs", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 920 | ":json", |
| 921 | ":port", |
| 922 | ":reflection", |
Joshua Haberman | 50c1298 | 2022-03-08 15:52:37 -0800 | [diff] [blame] | 923 | ":test_messages_proto2_upbdefs", |
| 924 | ":test_messages_proto3_upbdefs", |
Eric Salo | 0076500 | 2022-09-14 20:27:24 -0700 | [diff] [blame] | 925 | ":textformat", |
| 926 | ":upb", |
Joshua Haberman | 50c1298 | 2022-03-08 15:52:37 -0800 | [diff] [blame] | 927 | ], |
| 928 | ) |
| 929 | |
| 930 | make_shell_script( |
| 931 | name = "gen_test_conformance_upb_dynamic_minitable", |
| 932 | out = "test_conformance_upb_dynamic_minitable.sh", |
Joshua Haberman | 32f45b5 | 2022-05-09 22:00:33 -0700 | [diff] [blame] | 933 | contents = "external/com_google_protobuf/conformance/conformance_test_runner " + |
Joshua Haberman | 50c1298 | 2022-03-08 15:52:37 -0800 | [diff] [blame] | 934 | " --enforce_recommended " + |
| 935 | " --failure_list ./upb/conformance_upb_failures.txt" + |
| 936 | " ./conformance_upb_dynamic_minitable", |
| 937 | ) |
| 938 | |
| 939 | sh_test( |
| 940 | name = "test_conformance_upb_dynamic_minitable", |
| 941 | srcs = ["test_conformance_upb_dynamic_minitable.sh"], |
| 942 | data = [ |
| 943 | "upb/conformance_upb_failures.txt", |
| 944 | ":conformance_upb_dynamic_minitable", |
Joshua Haberman | 32f45b5 | 2022-05-09 22:00:33 -0700 | [diff] [blame] | 945 | "@com_google_protobuf//conformance:conformance_test_runner", |
Joshua Haberman | 50c1298 | 2022-03-08 15:52:37 -0800 | [diff] [blame] | 946 | ], |
| 947 | deps = ["@bazel_tools//tools/bash/runfiles"], |
| 948 | ) |
| 949 | |
Joshua Haberman | 125db89 | 2022-06-30 09:07:48 -0700 | [diff] [blame] | 950 | cc_library( |
| 951 | name = "fuzz_test_util", |
| 952 | testonly = 1, |
| 953 | srcs = ["upb/fuzz_test_util.cc"], |
| 954 | hdrs = ["upb/fuzz_test_util.h"], |
| 955 | deps = [ |
| 956 | ":mini_table", |
Eric Salo | c033eff | 2022-10-27 14:36:38 -0700 | [diff] [blame] | 957 | ":mini_table_internal", |
Joshua Haberman | 125db89 | 2022-06-30 09:07:48 -0700 | [diff] [blame] | 958 | ":upb", |
| 959 | ], |
| 960 | ) |
| 961 | |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 962 | # Internal C/C++ libraries ##################################################### |
| 963 | |
| 964 | cc_library( |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 965 | name = "collections_internal", |
Protobuf Team Bot | 8c44f04 | 2022-06-30 10:35:56 -0700 | [diff] [blame] | 966 | srcs = [ |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 967 | "upb/collections/array.h", |
Eric Salo | fd040a8 | 2022-11-04 22:08:16 -0700 | [diff] [blame] | 968 | "upb/collections/map_gencode_util.h", |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 969 | "upb/collections/message_value.h", |
Protobuf Team Bot | 8c44f04 | 2022-06-30 10:35:56 -0700 | [diff] [blame] | 970 | "upb/msg.h", |
| 971 | "upb/status.h", |
| 972 | "upb/string_view.h", |
| 973 | "upb/upb.h", |
| 974 | ], |
Eric Salo | fd040a8 | 2022-11-04 22:08:16 -0700 | [diff] [blame] | 975 | hdrs = [ |
| 976 | "upb/collections/array_internal.h", |
| 977 | "upb/collections/map_internal.h", |
| 978 | ], |
Protobuf Team Bot | 8c44f04 | 2022-06-30 10:35:56 -0700 | [diff] [blame] | 979 | copts = UPB_DEFAULT_COPTS, |
| 980 | visibility = ["//:__subpackages__"], |
| 981 | deps = [ |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 982 | ":collections", |
Eric Salo | f409c99 | 2022-11-03 15:48:59 +0000 | [diff] [blame] | 983 | ":mem", |
Protobuf Team Bot | 8c44f04 | 2022-06-30 10:35:56 -0700 | [diff] [blame] | 984 | ":port", |
Eric Salo | fd040a8 | 2022-11-04 22:08:16 -0700 | [diff] [blame] | 985 | ":table_internal", |
Protobuf Team Bot | 8c44f04 | 2022-06-30 10:35:56 -0700 | [diff] [blame] | 986 | ], |
| 987 | ) |
| 988 | |
| 989 | cc_library( |
Eric Salo | f409c99 | 2022-11-03 15:48:59 +0000 | [diff] [blame] | 990 | name = "mem", |
Protobuf Team Bot | 8d0d13f | 2022-06-23 13:43:40 -0700 | [diff] [blame] | 991 | srcs = [ |
Eric Salo | f409c99 | 2022-11-03 15:48:59 +0000 | [diff] [blame] | 992 | "upb/mem/alloc.c", |
| 993 | "upb/mem/arena.c", |
| 994 | "upb/mem/arena_internal.h", |
Protobuf Team Bot | 8d0d13f | 2022-06-23 13:43:40 -0700 | [diff] [blame] | 995 | ], |
Eric Salo | f409c99 | 2022-11-03 15:48:59 +0000 | [diff] [blame] | 996 | hdrs = [ |
| 997 | "upb/mem/alloc.h", |
| 998 | "upb/mem/arena.h", |
| 999 | ], |
Protobuf Team Bot | 8d0d13f | 2022-06-23 13:43:40 -0700 | [diff] [blame] | 1000 | copts = UPB_DEFAULT_COPTS, |
| 1001 | visibility = ["//:__subpackages__"], |
Protobuf Team Bot | 15596be | 2022-06-24 10:38:27 -0700 | [diff] [blame] | 1002 | deps = [":port"], |
Protobuf Team Bot | 8d0d13f | 2022-06-23 13:43:40 -0700 | [diff] [blame] | 1003 | ) |
| 1004 | |
| 1005 | cc_library( |
Eric Salo | f409c99 | 2022-11-03 15:48:59 +0000 | [diff] [blame] | 1006 | name = "mem_internal", |
| 1007 | hdrs = ["upb/mem/arena_internal.h"], |
| 1008 | copts = UPB_DEFAULT_COPTS, |
| 1009 | visibility = ["//:__subpackages__"], |
| 1010 | deps = [ |
| 1011 | ":mem", |
| 1012 | ":port", |
| 1013 | ], |
| 1014 | ) |
| 1015 | |
| 1016 | cc_library( |
Eric Salo | c67021f | 2022-08-23 11:21:55 -0700 | [diff] [blame] | 1017 | name = "atoi_internal", |
| 1018 | srcs = ["upb/internal/atoi.c"], |
| 1019 | hdrs = ["upb/internal/atoi.h"], |
| 1020 | copts = UPB_DEFAULT_COPTS, |
| 1021 | visibility = ["//:__subpackages__"], |
| 1022 | deps = [":port"], |
| 1023 | ) |
| 1024 | |
| 1025 | cc_library( |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 1026 | name = "wire_internal", |
Protobuf Team Bot | ca08ff5 | 2022-06-24 16:32:40 -0700 | [diff] [blame] | 1027 | srcs = [ |
Protobuf Team Bot | ca08ff5 | 2022-06-24 16:32:40 -0700 | [diff] [blame] | 1028 | "upb/extension_registry.h", |
| 1029 | "upb/msg.h", |
| 1030 | "upb/msg_internal.h", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 1031 | "upb/wire/decode.h", |
Protobuf Team Bot | ca08ff5 | 2022-06-24 16:32:40 -0700 | [diff] [blame] | 1032 | ], |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 1033 | hdrs = [ |
Eric Salo | 46699b7 | 2022-11-05 09:51:07 -0700 | [diff] [blame] | 1034 | "upb/wire/common_internal.h", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 1035 | "upb/wire/decode_internal.h", |
| 1036 | "upb/wire/encode_internal.h", |
| 1037 | ], |
Protobuf Team Bot | ca08ff5 | 2022-06-24 16:32:40 -0700 | [diff] [blame] | 1038 | copts = UPB_DEFAULT_COPTS, |
| 1039 | visibility = ["//:__subpackages__"], |
| 1040 | deps = [ |
Eric Salo | fd040a8 | 2022-11-04 22:08:16 -0700 | [diff] [blame] | 1041 | ":collections_internal", |
Eric Salo | f409c99 | 2022-11-03 15:48:59 +0000 | [diff] [blame] | 1042 | ":mem_internal", |
Protobuf Team Bot | ca08ff5 | 2022-06-24 16:32:40 -0700 | [diff] [blame] | 1043 | ":port", |
| 1044 | ":table_internal", |
| 1045 | "//third_party/utf8_range", |
| 1046 | ], |
| 1047 | ) |
| 1048 | |
| 1049 | cc_library( |
Protobuf Team Bot | 15596be | 2022-06-24 10:38:27 -0700 | [diff] [blame] | 1050 | name = "table_internal", |
| 1051 | srcs = [ |
| 1052 | "upb/internal/table.c", |
| 1053 | ], |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 1054 | hdrs = [ |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 1055 | "upb/internal/table.h", |
Eric Salo | f409c99 | 2022-11-03 15:48:59 +0000 | [diff] [blame] | 1056 | "upb/mem/alloc.h", |
| 1057 | "upb/mem/arena.h", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 1058 | "upb/status.h", |
Protobuf Team Bot | e153b52 | 2022-06-23 14:12:45 -0700 | [diff] [blame] | 1059 | "upb/string_view.h", |
Joshua Haberman | efd576b | 2020-10-26 21:37:17 -0700 | [diff] [blame] | 1060 | "upb/upb.h", |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 1061 | ], |
Protobuf Team Bot | 15596be | 2022-06-24 10:38:27 -0700 | [diff] [blame] | 1062 | copts = UPB_DEFAULT_COPTS, |
| 1063 | visibility = ["//:__subpackages__"], |
| 1064 | deps = [":port"], |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 1065 | ) |
| 1066 | |
Eric Salo | 410143b | 2022-07-08 16:27:56 -0700 | [diff] [blame] | 1067 | cc_library( |
| 1068 | name = "unicode_internal", |
| 1069 | srcs = [ |
| 1070 | "upb/internal/unicode.c", |
| 1071 | ], |
| 1072 | hdrs = [ |
| 1073 | "upb/internal/unicode.h", |
| 1074 | ], |
| 1075 | copts = UPB_DEFAULT_COPTS, |
| 1076 | visibility = ["//:__subpackages__"], |
| 1077 | deps = [":port"], |
| 1078 | ) |
| 1079 | |
Joshua Haberman | 77371f0 | 2019-01-23 16:26:13 -0800 | [diff] [blame] | 1080 | # Amalgamation ################################################################# |
| 1081 | |
Protobuf Team | b8edc71 | 2022-03-16 08:24:52 -0700 | [diff] [blame] | 1082 | # begin:github_only |
Joshua Haberman | 83c0edb | 2021-02-28 16:56:49 -0800 | [diff] [blame] | 1083 | |
Joshua Haberman | 77371f0 | 2019-01-23 16:26:13 -0800 | [diff] [blame] | 1084 | upb_amalgamation( |
| 1085 | name = "gen_amalgamation", |
| 1086 | outs = [ |
| 1087 | "upb.c", |
| 1088 | "upb.h", |
| 1089 | ], |
Joshua Haberman | 77371f0 | 2019-01-23 16:26:13 -0800 | [diff] [blame] | 1090 | libs = [ |
Eric Salo | c67021f | 2022-08-23 11:21:55 -0700 | [diff] [blame] | 1091 | ":atoi_internal", |
Protobuf Team | 823ed18 | 2022-04-28 16:07:14 -0700 | [diff] [blame] | 1092 | ":collections", |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 1093 | ":collections_internal", |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 1094 | ":descriptor_upb_proto", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 1095 | ":extension_registry", |
Joshua Haberman | fa8b605 | 2022-04-19 13:15:55 -0700 | [diff] [blame] | 1096 | ":fastdecode", |
Eric Salo | f409c99 | 2022-11-03 15:48:59 +0000 | [diff] [blame] | 1097 | ":mem", |
| 1098 | ":mem_internal", |
Joshua Haberman | fa8b605 | 2022-04-19 13:15:55 -0700 | [diff] [blame] | 1099 | ":mini_table", |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 1100 | ":port", |
Joshua Haberman | fa8b605 | 2022-04-19 13:15:55 -0700 | [diff] [blame] | 1101 | ":reflection", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 1102 | ":reflection_internal", |
Joshua Haberman | fa8b605 | 2022-04-19 13:15:55 -0700 | [diff] [blame] | 1103 | ":upb", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 1104 | ":wire_internal", |
Joshua Haberman | 77371f0 | 2019-01-23 16:26:13 -0800 | [diff] [blame] | 1105 | ], |
Mike Kruskal | 17b6451 | 2022-07-13 15:00:01 -0700 | [diff] [blame] | 1106 | strip_import_prefix = ["src"], |
Joshua Haberman | 77371f0 | 2019-01-23 16:26:13 -0800 | [diff] [blame] | 1107 | ) |
| 1108 | |
| 1109 | cc_library( |
| 1110 | name = "amalgamation", |
| 1111 | srcs = ["upb.c"], |
| 1112 | hdrs = ["upb.h"], |
Joshua Haberman | e86541a | 2020-10-28 17:53:09 -0700 | [diff] [blame] | 1113 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | 4307f5d | 2021-10-11 23:02:32 -0700 | [diff] [blame] | 1114 | deps = ["//third_party/utf8_range"], |
Joshua Haberman | 77371f0 | 2019-01-23 16:26:13 -0800 | [diff] [blame] | 1115 | ) |
| 1116 | |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 1117 | upb_amalgamation( |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 1118 | name = "gen_php_amalgamation", |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 1119 | outs = [ |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 1120 | "php-upb.c", |
| 1121 | "php-upb.h", |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 1122 | ], |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 1123 | libs = [ |
Eric Salo | c67021f | 2022-08-23 11:21:55 -0700 | [diff] [blame] | 1124 | ":atoi_internal", |
Protobuf Team | 823ed18 | 2022-04-28 16:07:14 -0700 | [diff] [blame] | 1125 | ":collections", |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 1126 | ":collections_internal", |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 1127 | ":descriptor_upb_proto", |
| 1128 | ":descriptor_upb_proto_reflection", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 1129 | ":extension_registry", |
Joshua Haberman | fa8b605 | 2022-04-19 13:15:55 -0700 | [diff] [blame] | 1130 | ":fastdecode", |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 1131 | ":json", |
Eric Salo | f409c99 | 2022-11-03 15:48:59 +0000 | [diff] [blame] | 1132 | ":mem", |
| 1133 | ":mem_internal", |
Joshua Haberman | fa8b605 | 2022-04-19 13:15:55 -0700 | [diff] [blame] | 1134 | ":mini_table", |
| 1135 | ":port", |
| 1136 | ":reflection", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 1137 | ":reflection_internal", |
Joshua Haberman | 81e716d | 2022-09-30 17:41:33 +0000 | [diff] [blame] | 1138 | ":table_internal", |
Joshua Haberman | 32c6e9b | 2022-10-03 09:49:03 -0700 | [diff] [blame] | 1139 | ":unicode_internal", |
Joshua Haberman | fa8b605 | 2022-04-19 13:15:55 -0700 | [diff] [blame] | 1140 | ":upb", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 1141 | ":wire_internal", |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 1142 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 1143 | prefix = "php-", |
Mike Kruskal | 17b6451 | 2022-07-13 15:00:01 -0700 | [diff] [blame] | 1144 | strip_import_prefix = ["src"], |
Joshua Haberman | 32c6e9b | 2022-10-03 09:49:03 -0700 | [diff] [blame] | 1145 | visibility = ["@com_google_protobuf//php:__pkg__"], |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 1146 | ) |
| 1147 | |
| 1148 | cc_library( |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 1149 | name = "php_amalgamation", |
| 1150 | srcs = ["php-upb.c"], |
| 1151 | hdrs = ["php-upb.h"], |
Joshua Haberman | e86541a | 2020-10-28 17:53:09 -0700 | [diff] [blame] | 1152 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | 4307f5d | 2021-10-11 23:02:32 -0700 | [diff] [blame] | 1153 | deps = ["//third_party/utf8_range"], |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 1154 | ) |
| 1155 | |
Joshua Haberman | efefbff | 2020-08-03 10:12:31 -0700 | [diff] [blame] | 1156 | upb_amalgamation( |
| 1157 | name = "gen_ruby_amalgamation", |
Joshua Haberman | efefbff | 2020-08-03 10:12:31 -0700 | [diff] [blame] | 1158 | outs = [ |
| 1159 | "ruby-upb.c", |
| 1160 | "ruby-upb.h", |
| 1161 | ], |
Joshua Haberman | efefbff | 2020-08-03 10:12:31 -0700 | [diff] [blame] | 1162 | libs = [ |
Eric Salo | c67021f | 2022-08-23 11:21:55 -0700 | [diff] [blame] | 1163 | ":atoi_internal", |
Protobuf Team | 823ed18 | 2022-04-28 16:07:14 -0700 | [diff] [blame] | 1164 | ":collections", |
Eric Salo | fd14316 | 2022-11-03 17:17:17 -0700 | [diff] [blame] | 1165 | ":collections_internal", |
Joshua Haberman | efefbff | 2020-08-03 10:12:31 -0700 | [diff] [blame] | 1166 | ":descriptor_upb_proto", |
Protobuf Team Bot | e4635f2 | 2022-06-21 10:43:08 -0700 | [diff] [blame] | 1167 | ":extension_registry", |
Joshua Haberman | fa8b605 | 2022-04-19 13:15:55 -0700 | [diff] [blame] | 1168 | ":fastdecode", |
Joshua Haberman | efefbff | 2020-08-03 10:12:31 -0700 | [diff] [blame] | 1169 | ":json", |
Eric Salo | f409c99 | 2022-11-03 15:48:59 +0000 | [diff] [blame] | 1170 | ":mem", |
| 1171 | ":mem_internal", |
Joshua Haberman | fa8b605 | 2022-04-19 13:15:55 -0700 | [diff] [blame] | 1172 | ":mini_table", |
| 1173 | ":port", |
| 1174 | ":reflection", |
Eric Salo | 44916d7 | 2022-10-04 17:22:07 -0700 | [diff] [blame] | 1175 | ":reflection_internal", |
Joshua Haberman | 81e716d | 2022-09-30 17:41:33 +0000 | [diff] [blame] | 1176 | ":table_internal", |
Joshua Haberman | 82c6c48 | 2022-09-30 17:21:49 -0700 | [diff] [blame] | 1177 | ":unicode_internal", |
Joshua Haberman | fa8b605 | 2022-04-19 13:15:55 -0700 | [diff] [blame] | 1178 | ":upb", |
Eric Salo | e137175 | 2022-11-03 16:46:34 +0000 | [diff] [blame] | 1179 | ":wire_internal", |
Joshua Haberman | efefbff | 2020-08-03 10:12:31 -0700 | [diff] [blame] | 1180 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 1181 | prefix = "ruby-", |
Mike Kruskal | 17b6451 | 2022-07-13 15:00:01 -0700 | [diff] [blame] | 1182 | strip_import_prefix = ["src"], |
Joshua Haberman | ccd88d5 | 2022-09-03 01:52:54 +0000 | [diff] [blame] | 1183 | visibility = ["@com_google_protobuf//ruby:__pkg__"], |
Joshua Haberman | efefbff | 2020-08-03 10:12:31 -0700 | [diff] [blame] | 1184 | ) |
| 1185 | |
| 1186 | cc_library( |
| 1187 | name = "ruby_amalgamation", |
| 1188 | srcs = ["ruby-upb.c"], |
| 1189 | hdrs = ["ruby-upb.h"], |
Joshua Haberman | e86541a | 2020-10-28 17:53:09 -0700 | [diff] [blame] | 1190 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | 4307f5d | 2021-10-11 23:02:32 -0700 | [diff] [blame] | 1191 | deps = ["//third_party/utf8_range"], |
Joshua Haberman | efefbff | 2020-08-03 10:12:31 -0700 | [diff] [blame] | 1192 | ) |
| 1193 | |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 1194 | exports_files( |
| 1195 | [ |
Joshua Haberman | bfc86d3 | 2019-12-04 16:56:40 -0800 | [diff] [blame] | 1196 | "third_party/lunit/console.lua", |
| 1197 | "third_party/lunit/lunit.lua", |
| 1198 | ], |
Joshua Haberman | 11b6df0 | 2022-02-15 19:55:44 -0800 | [diff] [blame] | 1199 | visibility = ["//upb/bindings/lua:__pkg__"], |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 1200 | ) |
| 1201 | |
Joshua Haberman | 985145c | 2019-04-24 17:36:17 +0000 | [diff] [blame] | 1202 | filegroup( |
| 1203 | name = "cmake_files", |
| 1204 | srcs = glob([ |
Joshua Haberman | 985145c | 2019-04-24 17:36:17 +0000 | [diff] [blame] | 1205 | "upb/**/*", |
Joshua Haberman | 4f901b6 | 2020-10-14 16:32:43 -0700 | [diff] [blame] | 1206 | "third_party/**/*", |
Joshua Haberman | 9a66356 | 2019-05-13 16:13:39 -0700 | [diff] [blame] | 1207 | ]), |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 1208 | visibility = ["//cmake:__pkg__"], |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 1209 | ) |
Joshua Haberman | 83c0edb | 2021-02-28 16:56:49 -0800 | [diff] [blame] | 1210 | |
Protobuf Team | b8edc71 | 2022-03-16 08:24:52 -0700 | [diff] [blame] | 1211 | # end:github_only |
Joshua Haberman | 4ffeaa6 | 2022-06-01 12:25:11 -0700 | [diff] [blame] | 1212 | |
| 1213 | # begin:google_only |
| 1214 | # |
| 1215 | # py_binary( |
| 1216 | # name = "update_check_runs", |
| 1217 | # srcs = ["update_check_runs.py"], |
| 1218 | # main = "update_check_runs.py", |
| 1219 | # deps = [ |
| 1220 | # "//third_party/py/absl:app", |
Mike Kruskal | e1b11b6 | 2022-09-30 13:28:24 -0700 | [diff] [blame] | 1221 | # "//third_party/py/absl/flags", |
Joshua Haberman | 4ffeaa6 | 2022-06-01 12:25:11 -0700 | [diff] [blame] | 1222 | # ], |
| 1223 | # ) |
| 1224 | # |
Protobuf Team Bot | be98a91 | 2022-10-11 12:14:01 -0700 | [diff] [blame] | 1225 | # kt_native_interop_hint( |
| 1226 | # name = "upb_kotlin_native_hint", |
| 1227 | # compatible_with = ["//buildenv/target:non_prod"], |
| 1228 | # headers_to_exclude = glob([ |
| 1229 | # "**/*.hpp", |
| 1230 | # ]) + [ |
| 1231 | # "upb/extension_registry.h", |
| 1232 | # ], |
| 1233 | # no_string_conversion = ["upb_MiniTable_Build"], |
| 1234 | # strict_enums = ["upb_FieldType"], |
| 1235 | # ) |
| 1236 | # |
| 1237 | # kt_native_interop_hint( |
| 1238 | # name = "suppress_kotlin_interop", |
| 1239 | # compatible_with = ["//buildenv/target:non_prod"], |
| 1240 | # suppressed = True, |
| 1241 | # ) |
| 1242 | # |
Joshua Haberman | 4ffeaa6 | 2022-06-01 12:25:11 -0700 | [diff] [blame] | 1243 | # end:google_only |