clean up the build targets for collections, mem, reflection

PiperOrigin-RevId: 488226166
pull/13171/head
Eric Salo 2 years ago committed by Copybara-Service
parent 33633fd604
commit 632471333c
  1. 159
      BUILD

159
BUILD

@ -130,6 +130,7 @@ cc_library(
"upb/decode.h", "upb/decode.h",
"upb/encode.h", "upb/encode.h",
"upb/extension_registry.h", "upb/extension_registry.h",
"upb/map.h",
"upb/mem/alloc.h", "upb/mem/alloc.h",
"upb/mem/arena.h", "upb/mem/arena.h",
"upb/msg.h", "upb/msg.h",
@ -237,7 +238,6 @@ cc_library(
copts = UPB_DEFAULT_COPTS, copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":collections",
":collections_internal", ":collections_internal",
":mini_table", ":mini_table",
":mini_table_internal", ":mini_table_internal",
@ -387,7 +387,6 @@ cc_library(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":descriptor_upb_proto", ":descriptor_upb_proto",
":reflection",
":reflection_internal", ":reflection_internal",
":table_internal", ":table_internal",
], ],
@ -407,28 +406,43 @@ upb_proto_reflection_library(
cc_library( cc_library(
name = "collections", name = "collections",
hdrs = [
"upb/collections/array.h",
"upb/collections/map.h",
],
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
deps = [
":collections_internal",
":port",
],
)
cc_library(
name = "collections_internal",
srcs = [ srcs = [
"upb/collections/array.c", "upb/collections/array.c",
"upb/collections/array_internal.h",
"upb/collections/map.c", "upb/collections/map.c",
"upb/collections/map_internal.h",
"upb/collections/map_sorter.c", "upb/collections/map_sorter.c",
"upb/collections/message_value.h",
"upb/extension_registry.h", "upb/extension_registry.h",
"upb/msg.h", "upb/msg.h",
"upb/msg_internal.h", "upb/msg_internal.h",
"upb/status.h",
"upb/string_view.h",
], ],
hdrs = [ hdrs = [
"upb/array.h",
"upb/collections.h",
"upb/collections/array.h", "upb/collections/array.h",
"upb/collections/array_internal.h",
"upb/collections/map.h", "upb/collections/map.h",
"upb/collections/map_gencode_util.h",
"upb/collections/map_internal.h",
"upb/collections/map_sorter_internal.h", "upb/collections/map_sorter_internal.h",
"upb/map.h", "upb/collections/message_value.h",
], ],
copts = UPB_DEFAULT_COPTS, copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"], visibility = ["//:__subpackages__"],
deps = [ deps = [
":mem",
":port", ":port",
":table_internal", ":table_internal",
], ],
@ -438,46 +452,6 @@ cc_library(
# (= everything in upb/) we can move this build target down into reflection/ # (= everything in upb/) we can move this build target down into reflection/
cc_library( cc_library(
name = "reflection", name = "reflection",
srcs = [
"upb/reflection/common.h",
"upb/reflection/def_builder.c",
"upb/reflection/def_builder_internal.h",
"upb/reflection/def_pool.c",
"upb/reflection/def_pool.h",
"upb/reflection/def_pool_internal.h",
"upb/reflection/def_type.c",
"upb/reflection/def_type.h",
"upb/reflection/desc_state.c",
"upb/reflection/desc_state_internal.h",
"upb/reflection/enum_def.c",
"upb/reflection/enum_def.h",
"upb/reflection/enum_def_internal.h",
"upb/reflection/enum_value_def.c",
"upb/reflection/enum_value_def.h",
"upb/reflection/enum_value_def_internal.h",
"upb/reflection/extension_range.c",
"upb/reflection/extension_range.h",
"upb/reflection/extension_range_internal.h",
"upb/reflection/field_def.c",
"upb/reflection/field_def.h",
"upb/reflection/field_def_internal.h",
"upb/reflection/file_def.c",
"upb/reflection/file_def.h",
"upb/reflection/file_def_internal.h",
"upb/reflection/message.c",
"upb/reflection/message_def.c",
"upb/reflection/message_def.h",
"upb/reflection/message_def_internal.h",
"upb/reflection/method_def.c",
"upb/reflection/method_def.h",
"upb/reflection/method_def_internal.h",
"upb/reflection/oneof_def.c",
"upb/reflection/oneof_def.h",
"upb/reflection/oneof_def_internal.h",
"upb/reflection/service_def.c",
"upb/reflection/service_def.h",
"upb/reflection/service_def_internal.h",
],
hdrs = [ hdrs = [
"upb/def.h", "upb/def.h",
"upb/def.hpp", "upb/def.hpp",
@ -492,11 +466,8 @@ cc_library(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":collections", ":collections",
":descriptor_upb_proto",
":mini_table",
":mini_table_internal",
":port", ":port",
":table_internal", ":reflection_internal",
":upb", ":upb",
], ],
) )
@ -504,32 +475,49 @@ cc_library(
cc_library( cc_library(
name = "reflection_internal", name = "reflection_internal",
srcs = [ srcs = [
"upb/reflection/def_builder.c",
"upb/reflection/def_pool.c",
"upb/reflection/def_type.c",
"upb/reflection/desc_state.c",
"upb/reflection/enum_def.c",
"upb/reflection/enum_value_def.c",
"upb/reflection/extension_range.c",
"upb/reflection/field_def.c",
"upb/reflection/file_def.c",
"upb/reflection/message.c",
"upb/reflection/message_def.c",
"upb/reflection/method_def.c",
"upb/reflection/oneof_def.c",
"upb/reflection/service_def.c",
],
hdrs = [
"upb/reflection/common.h", "upb/reflection/common.h",
"upb/reflection/def.h",
"upb/reflection/def.hpp",
"upb/reflection/def_builder_internal.h", "upb/reflection/def_builder_internal.h",
"upb/reflection/def_pool.h", "upb/reflection/def_pool.h",
"upb/reflection/def_pool_internal.h",
"upb/reflection/def_type.h", "upb/reflection/def_type.h",
"upb/reflection/desc_state_internal.h", "upb/reflection/desc_state_internal.h",
"upb/reflection/enum_def.h", "upb/reflection/enum_def.h",
"upb/reflection/enum_def_internal.h",
"upb/reflection/enum_value_def.h", "upb/reflection/enum_value_def.h",
"upb/reflection/enum_value_def_internal.h",
"upb/reflection/extension_range.h", "upb/reflection/extension_range.h",
"upb/reflection/extension_range_internal.h",
"upb/reflection/field_def.h", "upb/reflection/field_def.h",
"upb/reflection/field_def_internal.h",
"upb/reflection/file_def.h", "upb/reflection/file_def.h",
"upb/reflection/file_def_internal.h",
"upb/reflection/message.h", "upb/reflection/message.h",
"upb/reflection/message.hpp",
"upb/reflection/message_def.h", "upb/reflection/message_def.h",
"upb/reflection/method_def.h",
"upb/reflection/oneof_def.h",
"upb/reflection/service_def.h",
],
hdrs = [
"upb/reflection/def_pool_internal.h",
"upb/reflection/enum_def_internal.h",
"upb/reflection/enum_value_def_internal.h",
"upb/reflection/extension_range_internal.h",
"upb/reflection/field_def_internal.h",
"upb/reflection/file_def_internal.h",
"upb/reflection/message_def_internal.h", "upb/reflection/message_def_internal.h",
"upb/reflection/method_def.h",
"upb/reflection/method_def_internal.h", "upb/reflection/method_def_internal.h",
"upb/reflection/oneof_def.h",
"upb/reflection/oneof_def_internal.h", "upb/reflection/oneof_def_internal.h",
"upb/reflection/service_def.h",
"upb/reflection/service_def_internal.h", "upb/reflection/service_def_internal.h",
], ],
copts = UPB_DEFAULT_COPTS, copts = UPB_DEFAULT_COPTS,
@ -540,7 +528,6 @@ cc_library(
":mini_table", ":mini_table",
":mini_table_internal", ":mini_table_internal",
":port", ":port",
":reflection",
":table_internal", ":table_internal",
":upb", ":upb",
], ],
@ -558,7 +545,7 @@ cc_library(
copts = UPB_DEFAULT_COPTS, copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":collections", ":collections_internal",
":port", ":port",
":reflection", ":reflection",
":wire_internal", ":wire_internal",
@ -964,57 +951,35 @@ cc_library(
# Internal C/C++ libraries ##################################################### # Internal C/C++ libraries #####################################################
cc_library( cc_library(
name = "collections_internal", name = "mem",
srcs = [
"upb/collections/array.h",
"upb/collections/map_gencode_util.h",
"upb/collections/message_value.h",
"upb/msg.h",
"upb/status.h",
"upb/string_view.h",
"upb/upb.h",
],
hdrs = [ hdrs = [
"upb/collections/array_internal.h", "upb/mem/alloc.h",
"upb/collections/map_internal.h", "upb/mem/arena.h",
], ],
copts = UPB_DEFAULT_COPTS, copts = UPB_DEFAULT_COPTS,
visibility = ["//:__subpackages__"], visibility = ["//:__subpackages__"],
deps = [ deps = [
":collections", ":mem_internal",
":mem",
":port", ":port",
":table_internal",
], ],
) )
cc_library( cc_library(
name = "mem", name = "mem_internal",
srcs = [ srcs = [
"upb/mem/alloc.c", "upb/mem/alloc.c",
"upb/mem/arena.c", "upb/mem/arena.c",
"upb/mem/arena_internal.h",
], ],
hdrs = [ hdrs = [
"upb/mem/alloc.h", "upb/mem/alloc.h",
"upb/mem/arena.h", "upb/mem/arena.h",
"upb/mem/arena_internal.h",
], ],
copts = UPB_DEFAULT_COPTS, copts = UPB_DEFAULT_COPTS,
visibility = ["//:__subpackages__"], visibility = ["//:__subpackages__"],
deps = [":port"], deps = [":port"],
) )
cc_library(
name = "mem_internal",
hdrs = ["upb/mem/arena_internal.h"],
copts = UPB_DEFAULT_COPTS,
visibility = ["//:__subpackages__"],
deps = [
":mem",
":port",
],
)
cc_library( cc_library(
name = "status", name = "status",
srcs = [ srcs = [
@ -1104,12 +1069,10 @@ upb_amalgamation(
], ],
libs = [ libs = [
":atoi_internal", ":atoi_internal",
":collections",
":collections_internal", ":collections_internal",
":descriptor_upb_proto", ":descriptor_upb_proto",
":extension_registry", ":extension_registry",
":fastdecode", ":fastdecode",
":mem",
":mem_internal", ":mem_internal",
":mini_table", ":mini_table",
":mini_table_accessors", ":mini_table_accessors",
@ -1139,14 +1102,12 @@ upb_amalgamation(
], ],
libs = [ libs = [
":atoi_internal", ":atoi_internal",
":collections",
":collections_internal", ":collections_internal",
":descriptor_upb_proto", ":descriptor_upb_proto",
":descriptor_upb_proto_reflection", ":descriptor_upb_proto_reflection",
":extension_registry", ":extension_registry",
":fastdecode", ":fastdecode",
":json", ":json",
":mem",
":mem_internal", ":mem_internal",
":mini_table", ":mini_table",
":mini_table_accessors", ":mini_table_accessors",
@ -1180,13 +1141,11 @@ upb_amalgamation(
], ],
libs = [ libs = [
":atoi_internal", ":atoi_internal",
":collections",
":collections_internal", ":collections_internal",
":descriptor_upb_proto", ":descriptor_upb_proto",
":extension_registry", ":extension_registry",
":fastdecode", ":fastdecode",
":json", ":json",
":mem",
":mem_internal", ":mem_internal",
":mini_table", ":mini_table",
":mini_table_accessors", ":mini_table_accessors",

Loading…
Cancel
Save