|
|
@ -54,6 +54,17 @@ config_setting( |
|
|
|
|
|
|
|
|
|
|
|
# Public C/C++ libraries ####################################################### |
|
|
|
# Public C/C++ libraries ####################################################### |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cc_library( |
|
|
|
|
|
|
|
name = "port", |
|
|
|
|
|
|
|
textual_hdrs = [ |
|
|
|
|
|
|
|
"upb/port_def.inc", |
|
|
|
|
|
|
|
"upb/port_undef.inc", |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
srcs = [ |
|
|
|
|
|
|
|
"upb/port.c", |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
cc_library( |
|
|
|
cc_library( |
|
|
|
name = "upb", |
|
|
|
name = "upb", |
|
|
|
srcs = [ |
|
|
|
srcs = [ |
|
|
@ -62,9 +73,6 @@ cc_library( |
|
|
|
"upb/generated_util.h", |
|
|
|
"upb/generated_util.h", |
|
|
|
"upb/msg.c", |
|
|
|
"upb/msg.c", |
|
|
|
"upb/msg.h", |
|
|
|
"upb/msg.h", |
|
|
|
"upb/port.c", |
|
|
|
|
|
|
|
"upb/port_def.inc", |
|
|
|
|
|
|
|
"upb/port_undef.inc", |
|
|
|
|
|
|
|
"upb/table.c", |
|
|
|
"upb/table.c", |
|
|
|
"upb/table.int.h", |
|
|
|
"upb/table.int.h", |
|
|
|
"upb/upb.c", |
|
|
|
"upb/upb.c", |
|
|
@ -79,6 +87,7 @@ cc_library( |
|
|
|
"//conditions:default": COPTS |
|
|
|
"//conditions:default": COPTS |
|
|
|
}), |
|
|
|
}), |
|
|
|
visibility = ["//visibility:public"], |
|
|
|
visibility = ["//visibility:public"], |
|
|
|
|
|
|
|
deps = [":port"], |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
# Common support routines used by generated code. This library has no |
|
|
|
# Common support routines used by generated code. This library has no |
|
|
@ -97,12 +106,11 @@ cc_library( |
|
|
|
":windows": [], |
|
|
|
":windows": [], |
|
|
|
"//conditions:default": COPTS |
|
|
|
"//conditions:default": COPTS |
|
|
|
}), |
|
|
|
}), |
|
|
|
textual_hdrs = [ |
|
|
|
|
|
|
|
"upb/port_def.inc", |
|
|
|
|
|
|
|
"upb/port_undef.inc", |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
visibility = ["//visibility:public"], |
|
|
|
visibility = ["//visibility:public"], |
|
|
|
deps = [":upb"], |
|
|
|
deps = [ |
|
|
|
|
|
|
|
":port", |
|
|
|
|
|
|
|
":upb", |
|
|
|
|
|
|
|
], |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
upb_proto_library( |
|
|
|
upb_proto_library( |
|
|
@ -138,7 +146,10 @@ cc_library( |
|
|
|
cc_library( |
|
|
|
cc_library( |
|
|
|
name = "table", |
|
|
|
name = "table", |
|
|
|
hdrs = ["upb/table.int.h"], |
|
|
|
hdrs = ["upb/table.int.h"], |
|
|
|
deps = [":upb"], |
|
|
|
deps = [ |
|
|
|
|
|
|
|
":port", |
|
|
|
|
|
|
|
":upb", |
|
|
|
|
|
|
|
], |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
# Legacy C/C++ Libraries (not recommended for new code) ######################## |
|
|
|
# Legacy C/C++ Libraries (not recommended for new code) ######################## |
|
|
@ -146,6 +157,7 @@ cc_library( |
|
|
|
cc_library( |
|
|
|
cc_library( |
|
|
|
name = "legacy_msg_reflection", |
|
|
|
name = "legacy_msg_reflection", |
|
|
|
srcs = [ |
|
|
|
srcs = [ |
|
|
|
|
|
|
|
"upb/msg.h", |
|
|
|
"upb/legacy_msg_reflection.c", |
|
|
|
"upb/legacy_msg_reflection.c", |
|
|
|
], |
|
|
|
], |
|
|
|
hdrs = ["upb/legacy_msg_reflection.h"], |
|
|
|
hdrs = ["upb/legacy_msg_reflection.h"], |
|
|
@ -154,6 +166,7 @@ cc_library( |
|
|
|
"//conditions:default": COPTS |
|
|
|
"//conditions:default": COPTS |
|
|
|
}), |
|
|
|
}), |
|
|
|
deps = [ |
|
|
|
deps = [ |
|
|
|
|
|
|
|
":port", |
|
|
|
":table", |
|
|
|
":table", |
|
|
|
":upb", |
|
|
|
":upb", |
|
|
|
], |
|
|
|
], |
|
|
@ -286,6 +299,11 @@ cc_binary( |
|
|
|
|
|
|
|
|
|
|
|
# C/C++ tests ################################################################## |
|
|
|
# C/C++ tests ################################################################## |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
upb_proto_reflection_library( |
|
|
|
|
|
|
|
name = "descriptor_upbreflection", |
|
|
|
|
|
|
|
deps = ["@com_google_protobuf//:descriptor_proto"], |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
cc_binary( |
|
|
|
cc_binary( |
|
|
|
name = "benchmark", |
|
|
|
name = "benchmark", |
|
|
|
testonly = 1, |
|
|
|
testonly = 1, |
|
|
@ -431,11 +449,6 @@ cc_binary( |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
# copybara:strip_for_google3_begin |
|
|
|
# copybara:strip_for_google3_begin |
|
|
|
upb_proto_reflection_library( |
|
|
|
|
|
|
|
name = "descriptor_upbreflection", |
|
|
|
|
|
|
|
deps = ["@com_google_protobuf//:descriptor_proto"], |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cc_test( |
|
|
|
cc_test( |
|
|
|
name = "test_encoder", |
|
|
|
name = "test_encoder", |
|
|
|
srcs = ["tests/pb/test_encoder.cc"], |
|
|
|
srcs = ["tests/pb/test_encoder.cc"], |
|
|
@ -563,6 +576,7 @@ upb_amalgamation( |
|
|
|
":descriptor_upbproto", |
|
|
|
":descriptor_upbproto", |
|
|
|
":reflection", |
|
|
|
":reflection", |
|
|
|
":handlers", |
|
|
|
":handlers", |
|
|
|
|
|
|
|
":port", |
|
|
|
":upb_pb", |
|
|
|
":upb_pb", |
|
|
|
":upb_json", |
|
|
|
":upb_json", |
|
|
|
], |
|
|
|
], |
|
|
|