diff options
-rw-r--r-- | BUILD | 15 | ||||
-rw-r--r-- | build_defs.bzl | 12 |
2 files changed, 10 insertions, 17 deletions
@@ -7,7 +7,6 @@ load( "lua_library", "lua_test", "make_shell_script", - "map_dep", "upb_amalgamation", "upb_proto_library", "upb_proto_reflection_library", @@ -71,7 +70,7 @@ cc_library( upb_proto_library( name = "descriptor_upbproto", - deps = [map_dep("@com_google_protobuf//:descriptor_proto")], + deps = ["@com_google_protobuf//:descriptor_proto"], ) cc_library( @@ -196,10 +195,10 @@ cc_library( hdrs = ["upbc/generator.h"], copts = CPPOPTS, deps = [ - map_dep("@absl//absl/base:core_headers"), - map_dep("@absl//absl/strings"), - map_dep("@com_google_protobuf//:protobuf"), - map_dep("@com_google_protobuf//:protoc_lib"), + "@absl//absl/base:core_headers", + "@absl//absl/strings", + "@com_google_protobuf//:protobuf", + "@com_google_protobuf//:protoc_lib", ], ) @@ -210,7 +209,7 @@ cc_binary( visibility = ["//visibility:public"], deps = [ ":upbc_generator", - map_dep("@com_google_protobuf//:protoc_lib"), + "@com_google_protobuf//:protoc_lib", ], ) @@ -384,7 +383,7 @@ cc_binary( make_shell_script( name = "gen_test_conformance_upb", out = "test_conformance_upb.sh", - contents = "$(rlocation com_google_protobuf/conformance_test_runner) $(rlocation upb/conformance_upb)", + contents = "$(rlocation @com_google_protobuf/conformance_test_runner) $(rlocation upb/conformance_upb)", ) sh_test( diff --git a/build_defs.bzl b/build_defs.bzl index 70854d9..5517933 100644 --- a/build_defs.bzl +++ b/build_defs.bzl @@ -239,12 +239,6 @@ google3_dep_map = { "@com_google_protobuf//:protoc_lib": "//third_party/protobuf:libprotoc", } -def map_dep(dep): - if is_bazel: - return dep - else: - return google3_dep_map[dep] - def _get_real_short_path(file): # For some reason, files from other archives have short paths that look like: # ../com_google_protobuf/google/protobuf/descriptor.proto @@ -430,10 +424,10 @@ _upb_proto_library_aspect = aspect( "_protoc": attr.label( executable = True, cfg = "host", - default = map_dep("@com_google_protobuf//:protoc"), + default = "@com_google_protobuf//:protoc", ), "_cc_toolchain": attr.label( - default = map_dep("@bazel_tools//tools/cpp:current_cc_toolchain"), + default = "@bazel_tools//tools/cpp:current_cc_toolchain", ), "_upb": attr.label(default = ":upb"), "_ext": attr.string(default = ".upb"), @@ -481,7 +475,7 @@ upb_proto_srcs = rule( "_protoc": attr.label( executable = True, cfg = "host", - default = map_dep("@com_google_protobuf//:protoc"), + default = "@com_google_protobuf//:protoc", ), "deps": attr.label_list(), "ext": attr.string(default = ".upb") |