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 | 2c16649 | 2020-10-17 15:49:11 -0700 | [diff] [blame] | 29 | "upb_amalgamation", # copybara:strip_for_google3 |
Joshua Haberman | 06b90f9 | 2019-05-14 15:58:58 -0700 | [diff] [blame] | 30 | ) |
Joshua Haberman | 06b90f9 | 2019-05-14 15:58:58 -0700 | [diff] [blame] | 31 | load( |
Joshua Haberman | 5611ff2 | 2019-05-16 11:35:00 -0700 | [diff] [blame] | 32 | "//bazel:upb_proto_library.bzl", |
Joshua Haberman | a345af9 | 2020-10-18 13:39:13 -0700 | [diff] [blame] | 33 | "upb_fasttable_enabled", |
Josh Haberman | a7ebe54 | 2018-11-03 18:18:47 -0700 | [diff] [blame] | 34 | "upb_proto_library", |
Joshua Haberman | a274ad7 | 2020-10-28 13:06:30 -0700 | [diff] [blame] | 35 | "upb_proto_library_copts", |
Joshua Haberman | e8f9eac | 2020-10-28 22:50:03 -0700 | [diff] [blame] | 36 | "upb_proto_reflection_library", |
Josh Haberman | 2655ed9 | 2018-11-03 13:04:10 -0700 | [diff] [blame] | 37 | ) |
Joshua Haberman | 0dc2394 | 2020-06-05 09:17:33 -0700 | [diff] [blame] | 38 | |
Joshua Haberman | 83c0edb | 2021-02-28 16:56:49 -0800 | [diff] [blame] | 39 | licenses(["notice"]) |
Joshua Haberman | 7f9f722 | 2019-01-23 17:10:22 -0800 | [diff] [blame] | 40 | |
| 41 | exports_files([ |
| 42 | "LICENSE", |
| 43 | "build_defs", |
| 44 | ]) |
| 45 | |
Joshua Haberman | 00f96cb | 2019-03-27 12:13:59 -0700 | [diff] [blame] | 46 | config_setting( |
Nicolas "Pixel" Noble | ce3ba4d | 2019-07-18 01:12:00 +0200 | [diff] [blame] | 47 | name = "windows", |
| 48 | constraint_values = ["@bazel_tools//platforms:windows"], |
| 49 | ) |
| 50 | |
Joshua Haberman | a345af9 | 2020-10-18 13:39:13 -0700 | [diff] [blame] | 51 | upb_fasttable_enabled( |
| 52 | name = "fasttable_enabled", |
Joshua Haberman | b928696 | 2020-10-26 21:23:16 -0700 | [diff] [blame] | 53 | build_setting_default = False, |
Joshua Haberman | a345af9 | 2020-10-18 13:39:13 -0700 | [diff] [blame] | 54 | visibility = ["//visibility:public"], |
| 55 | ) |
| 56 | |
Joshua Haberman | e8f9eac | 2020-10-28 22:50:03 -0700 | [diff] [blame] | 57 | config_setting( |
| 58 | name = "fasttable_enabled_setting", |
| 59 | flag_values = {"//:fasttable_enabled": "true"}, |
| 60 | ) |
| 61 | |
Joshua Haberman | a274ad7 | 2020-10-28 13:06:30 -0700 | [diff] [blame] | 62 | upb_proto_library_copts( |
| 63 | name = "upb_proto_library_copts__for_generated_code_only_do_not_use", |
| 64 | copts = UPB_DEFAULT_COPTS, |
| 65 | visibility = ["//visibility:public"], |
| 66 | ) |
| 67 | |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 68 | # Public C/C++ libraries ####################################################### |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 69 | |
| 70 | cc_library( |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 71 | name = "port", |
Joshua Haberman | 558315a | 2020-10-28 17:13:13 -0700 | [diff] [blame] | 72 | copts = UPB_DEFAULT_COPTS, |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 73 | textual_hdrs = [ |
| 74 | "upb/port_def.inc", |
| 75 | "upb/port_undef.inc", |
| 76 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 77 | visibility = ["//tests:__pkg__"], |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 78 | ) |
| 79 | |
| 80 | cc_library( |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 81 | name = "upb", |
| 82 | srcs = [ |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 83 | "upb/decode.c", |
Joshua Haberman | 3881393 | 2021-04-05 16:00:25 -0700 | [diff] [blame] | 84 | "upb/decode_internal.h", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 85 | "upb/encode.c", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 86 | "upb/msg.c", |
Joshua Haberman | 3881393 | 2021-04-05 16:00:25 -0700 | [diff] [blame] | 87 | "upb/msg_internal.h", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 88 | "upb/table.c", |
Joshua Haberman | 3881393 | 2021-04-05 16:00:25 -0700 | [diff] [blame] | 89 | "upb/table_internal.h", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 90 | "upb/upb.c", |
Joshua Haberman | 3881393 | 2021-04-05 16:00:25 -0700 | [diff] [blame] | 91 | "upb/upb_internal.h", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 92 | ], |
| 93 | hdrs = [ |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 94 | "upb/decode.h", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 95 | "upb/encode.h", |
Joshua Haberman | 1674f28 | 2021-04-04 18:43:24 -0700 | [diff] [blame] | 96 | "upb/msg.h", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 97 | "upb/upb.h", |
Joshua Haberman | 2559e78 | 2020-04-09 14:36:24 -0700 | [diff] [blame] | 98 | "upb/upb.hpp", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 99 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 100 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | ba29af3 | 2019-06-01 19:27:49 -0700 | [diff] [blame] | 101 | visibility = ["//visibility:public"], |
Joshua Haberman | efd576b | 2020-10-26 21:37:17 -0700 | [diff] [blame] | 102 | deps = [ |
| 103 | ":fastdecode", |
| 104 | ":port", |
Joshua Haberman | e9b7954 | 2020-11-04 11:12:36 -0800 | [diff] [blame] | 105 | "//third_party/wyhash", |
Joshua Haberman | efd576b | 2020-10-26 21:37:17 -0700 | [diff] [blame] | 106 | ], |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 107 | ) |
| 108 | |
| 109 | cc_library( |
| 110 | name = "fastdecode", |
| 111 | srcs = [ |
Joshua Haberman | 3881393 | 2021-04-05 16:00:25 -0700 | [diff] [blame] | 112 | "upb/decode_internal.h", |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 113 | "upb/decode_fast.c", |
| 114 | "upb/decode_fast.h", |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 115 | "upb/msg.h", |
Joshua Haberman | 3881393 | 2021-04-05 16:00:25 -0700 | [diff] [blame] | 116 | "upb/msg_internal.h", |
| 117 | "upb/upb_internal.h", |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 118 | ], |
Joshua Haberman | e86541a | 2020-10-28 17:53:09 -0700 | [diff] [blame] | 119 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | efd576b | 2020-10-26 21:37:17 -0700 | [diff] [blame] | 120 | deps = [ |
| 121 | ":port", |
| 122 | ":table", |
| 123 | ], |
Joshua Haberman | ba29af3 | 2019-06-01 19:27:49 -0700 | [diff] [blame] | 124 | ) |
| 125 | |
| 126 | # Common support routines used by generated code. This library has no |
| 127 | # implementation, but depends on :upb and exposes a few more hdrs. |
| 128 | # |
| 129 | # This is public only because we have no way of visibility-limiting it to |
| 130 | # upb_proto_library() only. This interface is not stable and by using it you |
| 131 | # give up any backward compatibility guarantees. |
| 132 | cc_library( |
| 133 | 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] | 134 | hdrs = [ |
Joshua Haberman | aec762e | 2020-10-11 23:14:50 -0700 | [diff] [blame] | 135 | "upb/decode_fast.h", |
Joshua Haberman | ba29af3 | 2019-06-01 19:27:49 -0700 | [diff] [blame] | 136 | "upb/msg.h", |
Joshua Haberman | 42bdfcb | 2021-04-06 09:25:28 -0700 | [diff] [blame^] | 137 | "upb/msg_internal.h", |
Anna R | a27429f | 2020-01-09 14:50:03 -0800 | [diff] [blame] | 138 | "upb/port_def.inc", |
| 139 | "upb/port_undef.inc", |
Joshua Haberman | ba29af3 | 2019-06-01 19:27:49 -0700 | [diff] [blame] | 140 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 141 | copts = UPB_DEFAULT_COPTS, |
Vishal Powar | 7031f77 | 2018-11-28 15:32:16 -0800 | [diff] [blame] | 142 | visibility = ["//visibility:public"], |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 143 | deps = [ |
Joshua Haberman | 4b8c04e | 2020-02-18 16:50:25 -0800 | [diff] [blame] | 144 | ":table", |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 145 | ":upb", |
| 146 | ], |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 147 | ) |
| 148 | |
Josh Haberman | cd9e1e6 | 2019-04-17 15:23:00 -0700 | [diff] [blame] | 149 | upb_proto_library( |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 150 | name = "descriptor_upb_proto", |
| 151 | visibility = ["//visibility:public"], |
| 152 | deps = ["@com_google_protobuf//:descriptor_proto"], |
| 153 | ) |
| 154 | |
| 155 | upb_proto_reflection_library( |
| 156 | name = "descriptor_upb_proto_reflection", |
Joshua Haberman | c58541e | 2019-05-15 09:49:29 -0700 | [diff] [blame] | 157 | visibility = ["//visibility:public"], |
Google-Autofuzz | 8f19667 | 2019-06-25 20:14:14 -0400 | [diff] [blame] | 158 | deps = ["@com_google_protobuf//:descriptor_proto"], |
Josh Haberman | cd9e1e6 | 2019-04-17 15:23:00 -0700 | [diff] [blame] | 159 | ) |
| 160 | |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 161 | cc_library( |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 162 | name = "reflection", |
| 163 | srcs = [ |
| 164 | "upb/def.c", |
Joshua Haberman | 58010a3 | 2020-02-18 16:53:21 -0800 | [diff] [blame] | 165 | "upb/msg.h", |
Joshua Haberman | 9a360ad | 2019-11-12 08:08:46 -0800 | [diff] [blame] | 166 | "upb/reflection.c", |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 167 | ], |
| 168 | hdrs = [ |
| 169 | "upb/def.h", |
Joshua Haberman | 2559e78 | 2020-04-09 14:36:24 -0700 | [diff] [blame] | 170 | "upb/def.hpp", |
Joshua Haberman | 9a360ad | 2019-11-12 08:08:46 -0800 | [diff] [blame] | 171 | "upb/reflection.h", |
Joshua Haberman | 5e550e8 | 2021-01-09 15:45:44 -0800 | [diff] [blame] | 172 | "upb/reflection.hpp", |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 173 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 174 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 175 | visibility = ["//visibility:public"], |
Josh Haberman | cd9e1e6 | 2019-04-17 15:23:00 -0700 | [diff] [blame] | 176 | deps = [ |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 177 | ":descriptor_upb_proto", |
Anna R | fc49411 | 2020-01-09 14:16:25 -0800 | [diff] [blame] | 178 | ":port", |
Joshua Haberman | 9b07311 | 2019-05-14 11:12:13 -0700 | [diff] [blame] | 179 | ":table", |
Joshua Haberman | 9a66356 | 2019-05-13 16:13:39 -0700 | [diff] [blame] | 180 | ":upb", |
Josh Haberman | cd9e1e6 | 2019-04-17 15:23:00 -0700 | [diff] [blame] | 181 | ], |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 182 | ) |
| 183 | |
Joshua Haberman | ce1a399 | 2020-02-04 06:22:09 -0800 | [diff] [blame] | 184 | cc_library( |
| 185 | name = "textformat", |
| 186 | srcs = [ |
Joshua Haberman | 02c89a8 | 2020-02-10 14:56:27 -0800 | [diff] [blame] | 187 | "upb/text_encode.c", |
Joshua Haberman | ce1a399 | 2020-02-04 06:22:09 -0800 | [diff] [blame] | 188 | ], |
| 189 | hdrs = [ |
Joshua Haberman | 02c89a8 | 2020-02-10 14:56:27 -0800 | [diff] [blame] | 190 | "upb/text_encode.h", |
Joshua Haberman | ce1a399 | 2020-02-04 06:22:09 -0800 | [diff] [blame] | 191 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 192 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | ce1a399 | 2020-02-04 06:22:09 -0800 | [diff] [blame] | 193 | visibility = ["//visibility:public"], |
| 194 | deps = [ |
Joshua Haberman | 4b8c04e | 2020-02-18 16:50:25 -0800 | [diff] [blame] | 195 | ":port", |
Joshua Haberman | ce1a399 | 2020-02-04 06:22:09 -0800 | [diff] [blame] | 196 | ":reflection", |
| 197 | ], |
| 198 | ) |
| 199 | |
Joshua Haberman | 6e9db7d | 2020-02-15 19:31:51 -0800 | [diff] [blame] | 200 | cc_library( |
| 201 | name = "json", |
| 202 | srcs = [ |
Joshua Haberman | d49c1db | 2020-02-23 19:49:39 -0800 | [diff] [blame] | 203 | "upb/json_decode.c", |
Joshua Haberman | 6e9db7d | 2020-02-15 19:31:51 -0800 | [diff] [blame] | 204 | "upb/json_encode.c", |
| 205 | ], |
| 206 | hdrs = [ |
Joshua Haberman | d49c1db | 2020-02-23 19:49:39 -0800 | [diff] [blame] | 207 | "upb/json_decode.h", |
Joshua Haberman | 6e9db7d | 2020-02-15 19:31:51 -0800 | [diff] [blame] | 208 | "upb/json_encode.h", |
| 209 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 210 | copts = UPB_DEFAULT_COPTS, |
Lidi Zheng | f72c26c | 2020-12-10 16:23:08 -0800 | [diff] [blame] | 211 | visibility = ["//visibility:public"], |
Joshua Haberman | 6e9db7d | 2020-02-15 19:31:51 -0800 | [diff] [blame] | 212 | deps = [ |
Joshua Haberman | 4b8c04e | 2020-02-18 16:50:25 -0800 | [diff] [blame] | 213 | ":port", |
Joshua Haberman | 6e9db7d | 2020-02-15 19:31:51 -0800 | [diff] [blame] | 214 | ":reflection", |
Joshua Haberman | 4b8c04e | 2020-02-18 16:50:25 -0800 | [diff] [blame] | 215 | ":upb", |
Joshua Haberman | 6e9db7d | 2020-02-15 19:31:51 -0800 | [diff] [blame] | 216 | ], |
| 217 | ) |
| 218 | |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 219 | # Internal C/C++ libraries ##################################################### |
| 220 | |
| 221 | cc_library( |
| 222 | name = "table", |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 223 | hdrs = [ |
Joshua Haberman | 3881393 | 2021-04-05 16:00:25 -0700 | [diff] [blame] | 224 | "upb/table_internal.h", |
Joshua Haberman | efd576b | 2020-10-26 21:37:17 -0700 | [diff] [blame] | 225 | "upb/upb.h", |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 226 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 227 | visibility = ["//tests:__pkg__"], |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 228 | deps = [ |
| 229 | ":port", |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 230 | ], |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 231 | ) |
| 232 | |
Joshua Haberman | 77371f0 | 2019-01-23 16:26:13 -0800 | [diff] [blame] | 233 | # Amalgamation ################################################################# |
| 234 | |
Joshua Haberman | 83c0edb | 2021-02-28 16:56:49 -0800 | [diff] [blame] | 235 | # copybara:strip_for_google3_begin |
| 236 | |
Joshua Haberman | 77371f0 | 2019-01-23 16:26:13 -0800 | [diff] [blame] | 237 | py_binary( |
| 238 | name = "amalgamate", |
| 239 | srcs = ["tools/amalgamate.py"], |
| 240 | ) |
| 241 | |
| 242 | upb_amalgamation( |
| 243 | name = "gen_amalgamation", |
| 244 | outs = [ |
| 245 | "upb.c", |
| 246 | "upb.h", |
| 247 | ], |
| 248 | amalgamator = ":amalgamate", |
| 249 | libs = [ |
| 250 | ":upb", |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 251 | ":fastdecode", |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 252 | ":descriptor_upb_proto", |
Joshua Haberman | 928ef7f | 2019-03-27 12:52:33 -0700 | [diff] [blame] | 253 | ":reflection", |
Anna R | de1bc11 | 2020-01-07 15:45:19 -0800 | [diff] [blame] | 254 | ":port", |
Joshua Haberman | 77371f0 | 2019-01-23 16:26:13 -0800 | [diff] [blame] | 255 | ], |
| 256 | ) |
| 257 | |
| 258 | cc_library( |
| 259 | name = "amalgamation", |
| 260 | srcs = ["upb.c"], |
| 261 | hdrs = ["upb.h"], |
Joshua Haberman | e86541a | 2020-10-28 17:53:09 -0700 | [diff] [blame] | 262 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | e9b7954 | 2020-11-04 11:12:36 -0800 | [diff] [blame] | 263 | deps = ["//third_party/wyhash"], |
Joshua Haberman | 77371f0 | 2019-01-23 16:26:13 -0800 | [diff] [blame] | 264 | ) |
| 265 | |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 266 | upb_amalgamation( |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 267 | name = "gen_php_amalgamation", |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 268 | outs = [ |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 269 | "php-upb.c", |
| 270 | "php-upb.h", |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 271 | ], |
| 272 | amalgamator = ":amalgamate", |
| 273 | libs = [ |
| 274 | ":upb", |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 275 | ":fastdecode", |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 276 | ":descriptor_upb_proto", |
| 277 | ":descriptor_upb_proto_reflection", |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 278 | ":reflection", |
| 279 | ":port", |
| 280 | ":json", |
| 281 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 282 | prefix = "php-", |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 283 | ) |
| 284 | |
| 285 | cc_library( |
Joshua Haberman | 543a0ce | 2020-05-26 22:30:50 -0700 | [diff] [blame] | 286 | name = "php_amalgamation", |
| 287 | srcs = ["php-upb.c"], |
| 288 | hdrs = ["php-upb.h"], |
Joshua Haberman | e86541a | 2020-10-28 17:53:09 -0700 | [diff] [blame] | 289 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | e9b7954 | 2020-11-04 11:12:36 -0800 | [diff] [blame] | 290 | deps = ["//third_party/wyhash"], |
Joshua Haberman | 16facab | 2020-05-08 16:40:24 -0700 | [diff] [blame] | 291 | ) |
| 292 | |
Joshua Haberman | efefbff | 2020-08-03 10:12:31 -0700 | [diff] [blame] | 293 | upb_amalgamation( |
| 294 | name = "gen_ruby_amalgamation", |
Joshua Haberman | efefbff | 2020-08-03 10:12:31 -0700 | [diff] [blame] | 295 | outs = [ |
| 296 | "ruby-upb.c", |
| 297 | "ruby-upb.h", |
| 298 | ], |
| 299 | amalgamator = ":amalgamate", |
| 300 | libs = [ |
| 301 | ":upb", |
Joshua Haberman | cb234e6 | 2020-10-17 17:48:32 -0700 | [diff] [blame] | 302 | ":fastdecode", |
Joshua Haberman | efefbff | 2020-08-03 10:12:31 -0700 | [diff] [blame] | 303 | ":descriptor_upb_proto", |
| 304 | ":reflection", |
| 305 | ":port", |
| 306 | ":json", |
| 307 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 308 | prefix = "ruby-", |
Joshua Haberman | efefbff | 2020-08-03 10:12:31 -0700 | [diff] [blame] | 309 | ) |
| 310 | |
| 311 | cc_library( |
| 312 | name = "ruby_amalgamation", |
| 313 | srcs = ["ruby-upb.c"], |
| 314 | hdrs = ["ruby-upb.h"], |
Joshua Haberman | e86541a | 2020-10-28 17:53:09 -0700 | [diff] [blame] | 315 | copts = UPB_DEFAULT_COPTS, |
Joshua Haberman | e9b7954 | 2020-11-04 11:12:36 -0800 | [diff] [blame] | 316 | deps = ["//third_party/wyhash"], |
Joshua Haberman | efefbff | 2020-08-03 10:12:31 -0700 | [diff] [blame] | 317 | ) |
| 318 | |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 319 | exports_files( |
| 320 | [ |
| 321 | "upb/json/parser.rl", |
| 322 | "BUILD", |
| 323 | "WORKSPACE", |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 324 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 325 | visibility = ["//cmake:__pkg__"], |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 326 | ) |
| 327 | |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 328 | exports_files( |
| 329 | [ |
Joshua Haberman | bfc86d3 | 2019-12-04 16:56:40 -0800 | [diff] [blame] | 330 | "third_party/lunit/console.lua", |
| 331 | "third_party/lunit/lunit.lua", |
| 332 | ], |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 333 | visibility = ["//tests/bindings/lua:__pkg__"], |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 334 | ) |
| 335 | |
Joshua Haberman | 985145c | 2019-04-24 17:36:17 +0000 | [diff] [blame] | 336 | filegroup( |
| 337 | name = "cmake_files", |
| 338 | srcs = glob([ |
Joshua Haberman | 985145c | 2019-04-24 17:36:17 +0000 | [diff] [blame] | 339 | "google/**/*", |
| 340 | "upbc/**/*", |
| 341 | "upb/**/*", |
| 342 | "tests/**/*", |
Joshua Haberman | 4f901b6 | 2020-10-14 16:32:43 -0700 | [diff] [blame] | 343 | "third_party/**/*", |
Joshua Haberman | 9a66356 | 2019-05-13 16:13:39 -0700 | [diff] [blame] | 344 | ]), |
Joshua Haberman | e3f41de | 2020-10-17 13:15:58 -0700 | [diff] [blame] | 345 | visibility = ["//cmake:__pkg__"], |
Josh Haberman | 01ed4ce | 2018-11-02 12:49:15 -0700 | [diff] [blame] | 346 | ) |
Joshua Haberman | 83c0edb | 2021-02-28 16:56:49 -0800 | [diff] [blame] | 347 | |
| 348 | # copybara:strip_end |