summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2019-05-14 10:15:32 -0700
committerJoshua Haberman <jhaberman@gmail.com>2019-05-14 10:15:32 -0700
commit301b6e2d7839b7f835d410a59f76c7fcf3e692f2 (patch)
treec4395f27d13133646d4a065b72edcf4c13cb4265
parent9a66356d95f9aff04570a6b4e9e34cdc8cd6fa6b (diff)
Removed map_dep() in favor of rewrites.
-rw-r--r--BUILD15
-rw-r--r--build_defs.bzl12
2 files changed, 10 insertions, 17 deletions
diff --git a/BUILD b/BUILD
index bb89ebb..c7e24c7 100644
--- a/BUILD
+++ b/BUILD
@@ -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")
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback