summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD35
1 files changed, 32 insertions, 3 deletions
diff --git a/BUILD b/BUILD
index 11156c8..1d27b79 100644
--- a/BUILD
+++ b/BUILD
@@ -50,7 +50,11 @@ cc_library(
srcs = [
"upb/decode.c",
"upb/encode.c",
+ "upb/generated_util.h",
"upb/msg.c",
+ "upb/msg.h",
+ "upb/port_def.inc",
+ "upb/port_undef.inc",
"upb/table.c",
"upb/table.int.h",
"upb/upb.c",
@@ -58,16 +62,30 @@ cc_library(
hdrs = [
"upb/decode.h",
"upb/encode.h",
- "upb/generated_util.h",
- "upb/msg.h",
"upb/upb.h",
],
copts = COPTS,
- # Internal-only, but we have to make them public for generated code.
+ visibility = ["//visibility:public"],
+)
+
+# Common support routines used by generated code. This library has no
+# implementation, but depends on :upb and exposes a few more hdrs.
+#
+# This is public only because we have no way of visibility-limiting it to
+# upb_proto_library() only. This interface is not stable and by using it you
+# give up any backward compatibility guarantees.
+cc_library(
+ name = "generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
textual_hdrs = [
"upb/port_def.inc",
"upb/port_undef.inc",
],
+ hdrs = [
+ "upb/generated_util.h",
+ "upb/msg.h",
+ ],
+ deps = [":upb"],
+ copts = COPTS,
visibility = ["//visibility:public"],
)
@@ -231,6 +249,17 @@ cc_binary(
# C/C++ tests ##################################################################
+cc_binary(
+ name = "benchmark",
+ testonly = 1,
+ srcs = ["tests/benchmark.cc"],
+ deps = [
+ ":descriptor_upbproto",
+ ":descriptor_upbreflection",
+ "@com_github_google_benchmark//:benchmark_main",
+ ],
+)
+
cc_library(
name = "upb_test",
testonly = 1,
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback