diff --git a/BUILD b/BUILD index 6b51ef5437..442bab84a3 100644 --- a/BUILD +++ b/BUILD @@ -137,7 +137,9 @@ cc_library( cc_library( name = "generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", hdrs = [ + "upb/decode.h", "upb/decode_fast.h", + "upb/encode.h", "upb/msg.h", "upb/msg_internal.h", "upb/port_def.inc", @@ -151,6 +153,22 @@ cc_library( ], ) +cc_library( + name = "generated_reflection_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", + hdrs = [ + "upb/def.h", + "upb/port_def.inc", + "upb/port_undef.inc", + ], + copts = UPB_DEFAULT_COPTS, + visibility = ["//visibility:public"], + deps = [ + ":descriptor_upb_proto", + ":reflection", + ":table", + ], +) + upb_proto_library( name = "descriptor_upb_proto", visibility = ["//visibility:public"], diff --git a/bazel/upb_proto_library.bzl b/bazel/upb_proto_library.bzl index ae0434af6b..0a30eee611 100644 --- a/bazel/upb_proto_library.bzl +++ b/bazel/upb_proto_library.bzl @@ -299,7 +299,6 @@ _upb_proto_library_aspect = aspect( ), "_upb": attr.label_list(default = [ "//:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", - "//:upb", ]), "_fasttable_enabled": attr.label(default = "//:fasttable_enabled"), }), @@ -348,9 +347,7 @@ _upb_proto_reflection_library_aspect = aspect( ), "_upbdefs": attr.label_list( default = [ - "//:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", - "//:upb", - "//:reflection", + "//:generated_reflection_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", ], ), }), diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 1eed38db0b..30e6e93c06 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -97,6 +97,11 @@ add_library(generated_code_support__only_for_generated_code_do_not_use__i_give_p target_link_libraries(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE table upb) +add_library(generated_reflection_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE) +target_link_libraries(generated_reflection_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE + descriptor_upb_proto + reflection + table) add_library(reflection ../upb/def.c ../upb/msg.h