From aec12a466fde123ba7491055893951537b3fb9e7 Mon Sep 17 00:00:00 2001 From: Eric Salo Date: Tue, 8 Nov 2022 10:25:42 -0800 Subject: [PATCH] upb: split out :status as a separate build target This should allow other upb components to depend upon the zcis without causing a cycle PiperOrigin-RevId: 486987806 --- BUILD | 18 +++++++++++++++++- upb/io/BUILD | 5 +++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/BUILD b/BUILD index 35e67630cf..afb67a5fbb 100644 --- a/BUILD +++ b/BUILD @@ -118,7 +118,6 @@ cc_library( "upb/internal/unicode.h", "upb/msg.c", "upb/msg_internal.h", - "upb/status.c", "upb/upb.c", "upb/wire/decode.c", "upb/wire/encode.c", @@ -149,6 +148,7 @@ cc_library( ":fastdecode", ":mem", ":port", + ":status", ":table_internal", ":unicode_internal", ":wire_internal", @@ -1013,6 +1013,19 @@ cc_library( ], ) +cc_library( + name = "status", + srcs = [ + "upb/status.c", + ], + hdrs = [ + "upb/status.h", + ], + copts = UPB_DEFAULT_COPTS, + visibility = ["//:__subpackages__"], + deps = [":port"], +) + cc_library( name = "atoi_internal", srcs = ["upb/internal/atoi.c"], @@ -1100,6 +1113,7 @@ upb_amalgamation( ":port", ":reflection", ":reflection_internal", + ":status", ":upb", ":wire_internal", ], @@ -1135,6 +1149,7 @@ upb_amalgamation( ":port", ":reflection", ":reflection_internal", + ":status", ":table_internal", ":unicode_internal", ":upb", @@ -1173,6 +1188,7 @@ upb_amalgamation( ":port", ":reflection", ":reflection_internal", + ":status", ":table_internal", ":unicode_internal", ":upb", diff --git a/upb/io/BUILD b/upb/io/BUILD index 26e0bd51ae..3600a1855f 100644 --- a/upb/io/BUILD +++ b/upb/io/BUILD @@ -2,7 +2,7 @@ cc_library( name = "string", hdrs = ["string.h"], deps = [ - "//:upb", + "//:mem", "//:port", ], ) @@ -37,8 +37,9 @@ cc_library( "zero_copy_output_stream.h", ], deps = [ - "//:upb", + "//:mem", "//:port", + "//:status", ], )