Ran buildifier and fixed a few things for google3 import.

pull/13171/head
Joshua Haberman 5 years ago
parent 95fb9b2e38
commit 4b8c04e521
  1. 75
      BUILD
  2. 11
      CMakeLists.txt

75
BUILD

@ -57,13 +57,13 @@ config_setting(
cc_library( cc_library(
name = "port", name = "port",
srcs = [
"upb/port.c",
],
textual_hdrs = [ textual_hdrs = [
"upb/port_def.inc", "upb/port_def.inc",
"upb/port_undef.inc", "upb/port_undef.inc",
], ],
srcs = [
"upb/port.c",
],
) )
cc_library( cc_library(
@ -84,7 +84,7 @@ cc_library(
], ],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": COPTS "//conditions:default": COPTS,
}), }),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [":port"], deps = [":port"],
@ -105,10 +105,11 @@ cc_library(
], ],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": COPTS "//conditions:default": COPTS,
}), }),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":table",
":upb", ":upb",
], ],
) )
@ -131,7 +132,7 @@ cc_library(
], ],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": COPTS "//conditions:default": COPTS,
}), }),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
@ -152,6 +153,7 @@ cc_library(
], ],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":port",
":reflection", ":reflection",
], ],
) )
@ -165,8 +167,9 @@ cc_library(
"upb/json_encode.h", "upb/json_encode.h",
], ],
deps = [ deps = [
":upb", ":port",
":reflection", ":reflection",
":upb",
], ],
) )
@ -196,11 +199,11 @@ cc_library(
], ],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": COPTS "//conditions:default": COPTS,
}), }),
deps = [ deps = [
":reflection",
":port", ":port",
":reflection",
":table", ":table",
":upb", ":upb",
], ],
@ -224,13 +227,13 @@ cc_library(
], ],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": COPTS "//conditions:default": COPTS,
}), }),
deps = [ deps = [
":descriptor_upbproto", ":descriptor_upbproto",
":handlers", ":handlers",
":reflection",
":port", ":port",
":reflection",
":table", ":table",
":upb", ":upb",
], ],
@ -249,7 +252,7 @@ cc_library(
], ],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": COPTS "//conditions:default": COPTS,
}), }),
deps = [ deps = [
":upb", ":upb",
@ -283,7 +286,7 @@ cc_library(
hdrs = ["upbc/generator.h"], hdrs = ["upbc/generator.h"],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": CPPOPTS "//conditions:default": CPPOPTS,
}), }),
deps = [ deps = [
"@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/base:core_headers",
@ -299,7 +302,7 @@ cc_binary(
srcs = ["upbc/main.cc"], srcs = ["upbc/main.cc"],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": CPPOPTS "//conditions:default": CPPOPTS,
}), }),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
@ -341,7 +344,7 @@ cc_library(
], ],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": CPPOPTS "//conditions:default": CPPOPTS,
}), }),
deps = [ deps = [
":handlers", ":handlers",
@ -358,7 +361,7 @@ cc_test(
], ],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": COPTS "//conditions:default": COPTS,
}), }),
deps = [ deps = [
":port", ":port",
@ -390,7 +393,7 @@ cc_test(
], ],
) )
upb_proto_reflection_library( upb_proto_library(
name = "test_messages_proto3_proto_upb", name = "test_messages_proto3_proto_upb",
testonly = 1, testonly = 1,
deps = ["@com_google_protobuf//:test_messages_proto3_proto"], deps = ["@com_google_protobuf//:test_messages_proto3_proto"],
@ -416,7 +419,7 @@ cc_test(
], ],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": CPPOPTS "//conditions:default": CPPOPTS,
}), }),
deps = [ deps = [
":handlers", ":handlers",
@ -445,7 +448,7 @@ cc_test(
srcs = ["tests/test_cpp.cc"], srcs = ["tests/test_cpp.cc"],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": CPPOPTS "//conditions:default": CPPOPTS,
}), }),
deps = [ deps = [
":handlers", ":handlers",
@ -463,7 +466,7 @@ cc_test(
srcs = ["tests/test_table.cc"], srcs = ["tests/test_table.cc"],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": CPPOPTS "//conditions:default": CPPOPTS,
}), }),
deps = [ deps = [
":port", ":port",
@ -480,7 +483,7 @@ cc_binary(
srcs = ["tests/file_descriptor_parsenew_fuzzer.cc"], srcs = ["tests/file_descriptor_parsenew_fuzzer.cc"],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": CPPOPTS "//conditions:default": CPPOPTS,
}) + select({ }) + select({
"//conditions:default": [], "//conditions:default": [],
":fuzz": ["-fsanitize=fuzzer,address"], ":fuzz": ["-fsanitize=fuzzer,address"],
@ -501,7 +504,7 @@ cc_test(
srcs = ["tests/pb/test_encoder.cc"], srcs = ["tests/pb/test_encoder.cc"],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": CPPOPTS "//conditions:default": CPPOPTS,
}), }),
deps = [ deps = [
":descriptor_upbproto", ":descriptor_upbproto",
@ -546,7 +549,7 @@ cc_test(
], ],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": CPPOPTS "//conditions:default": CPPOPTS,
}), }),
deps = [ deps = [
":test_json_upbproto", ":test_json_upbproto",
@ -589,16 +592,16 @@ cc_binary(
], ],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": COPTS "//conditions:default": COPTS,
}) + ["-Ibazel-out/k8-fastbuild/bin"], }) + ["-Ibazel-out/k8-fastbuild/bin"],
deps = [ deps = [
":conformance_proto_upb", ":conformance_proto_upb",
":conformance_proto_upbdefs", ":conformance_proto_upbdefs",
":json",
":reflection",
":test_messages_proto2_upbdefs", ":test_messages_proto2_upbdefs",
":test_messages_proto3_upbdefs", ":test_messages_proto3_upbdefs",
":reflection",
":textformat", ":textformat",
":json",
":upb", ":upb",
], ],
) )
@ -653,7 +656,7 @@ cc_library(
hdrs = ["upb.h"], hdrs = ["upb.h"],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": COPTS "//conditions:default": COPTS,
}), }),
) )
@ -679,23 +682,23 @@ cc_library(
cc_test( cc_test(
name = "test_lua", name = "test_lua",
linkstatic = 1,
srcs = ["tests/bindings/lua/main.c"], srcs = ["tests/bindings/lua/main.c"],
data = [ data = [
"@com_google_protobuf//:conformance_proto",
"@com_google_protobuf//:descriptor_proto",
":descriptor_proto_lua",
":test_messages_proto3_proto_lua",
":test_proto_lua",
"tests/bindings/lua/test_upb.lua", "tests/bindings/lua/test_upb.lua",
"third_party/lunit/console.lua", "third_party/lunit/console.lua",
"third_party/lunit/lunit.lua", "third_party/lunit/lunit.lua",
"upb/bindings/lua/upb.lua", "upb/bindings/lua/upb.lua",
":descriptor_proto_lua",
":test_messages_proto3_proto_lua",
":test_proto_lua",
"@com_google_protobuf//:conformance_proto",
"@com_google_protobuf//:descriptor_proto",
], ],
linkstatic = 1,
deps = [ deps = [
":lupb", ":lupb",
"@lua//:liblua", "@lua//:liblua",
] ],
) )
cc_binary( cc_binary(
@ -703,12 +706,12 @@ cc_binary(
srcs = ["upb/bindings/lua/upbc.cc"], srcs = ["upb/bindings/lua/upbc.cc"],
copts = select({ copts = select({
":windows": [], ":windows": [],
"//conditions:default": CPPOPTS "//conditions:default": CPPOPTS,
}), }),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",
"@com_google_protobuf//:protoc_lib" "@com_google_protobuf//:protoc_lib",
], ],
) )

@ -77,6 +77,7 @@ target_link_libraries(upb
port) port)
add_library(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE) add_library(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE)
target_link_libraries(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE target_link_libraries(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE
table
upb) upb)
add_library(reflection add_library(reflection
upb/def.c upb/def.c
@ -92,13 +93,15 @@ add_library(textformat
upb/text_encode.c upb/text_encode.c
upb/text_encode.h) upb/text_encode.h)
target_link_libraries(textformat target_link_libraries(textformat
port
reflection) reflection)
add_library(json add_library(json
upb/json_encode.c upb/json_encode.c
upb/json_encode.h) upb/json_encode.h)
target_link_libraries(json target_link_libraries(json
upb port
reflection) reflection
upb)
add_library(table INTERFACE) add_library(table INTERFACE)
target_link_libraries(table INTERFACE target_link_libraries(table INTERFACE
port port
@ -110,8 +113,8 @@ add_library(handlers
upb/handlers.h upb/handlers.h
upb/sink.h) upb/sink.h)
target_link_libraries(handlers target_link_libraries(handlers
reflection
port port
reflection
table table
upb) upb)
add_library(upb_pb add_library(upb_pb
@ -128,8 +131,8 @@ add_library(upb_pb
target_link_libraries(upb_pb target_link_libraries(upb_pb
descriptor_upbproto descriptor_upbproto
handlers handlers
reflection
port port
reflection
table table
upb) upb)
add_library(upb_json add_library(upb_json

Loading…
Cancel
Save