1load( 2 "//bazel:build_defs.bzl", 3 "UPB_DEFAULT_CPPOPTS", 4) 5 6licenses(["notice"]) 7 8cc_library( 9 name = "common", 10 hdrs = ["common.h"], 11 srcs = ["common.cc"], 12 copts = UPB_DEFAULT_CPPOPTS, 13 deps = [ 14 "@com_google_protobuf//:protobuf", 15 "@com_google_absl//absl/strings", 16 ], 17) 18 19cc_binary( 20 name = "protoc-gen-upb", 21 srcs = [ 22 "protoc-gen-upb.cc", 23 "message_layout.cc", 24 "message_layout.h", 25 ], 26 copts = UPB_DEFAULT_CPPOPTS, 27 visibility = ["//visibility:public"], 28 deps = [ 29 ":common", 30 "@com_google_absl//absl/base:core_headers", 31 "@com_google_absl//absl/container:flat_hash_map", 32 "@com_google_absl//absl/strings", 33 "@com_google_protobuf//:protobuf", 34 "@com_google_protobuf//:protoc_lib", 35 ], 36) 37 38cc_binary( 39 name = "protoc-gen-upbdefs", 40 srcs = [ 41 "protoc-gen-upbdefs.cc", 42 ], 43 copts = UPB_DEFAULT_CPPOPTS, 44 visibility = ["//visibility:public"], 45 deps = [ 46 ":common", 47 "@com_google_absl//absl/base:core_headers", 48 "@com_google_absl//absl/container:flat_hash_map", 49 "@com_google_absl//absl/strings", 50 "@com_google_protobuf//:protobuf", 51 "@com_google_protobuf//:protoc_lib", 52 ], 53) 54