aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/build_rules
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2016-03-21 18:18:51 +0000
committerGravatar Lukacs Berki <lberki@google.com>2016-03-22 08:08:56 +0000
commiteab1ce2b95555ad506e21aa6a565a628fab4c331 (patch)
treedc8f4d24448cba3949468971c0236f2fb506fa35 /tools/build_rules
parent19b5675725caf69008a717082149237400260edc (diff)
Fix go_prefix to resolve to the right repository
This should reference the //:go_prefix rule in the repository the BUILD file using go_* is in, not the repository where def.bzl lives (probably @bazel_tools). -- MOS_MIGRATED_REVID=117733799
Diffstat (limited to 'tools/build_rules')
-rw-r--r--tools/build_rules/go/def.bzl5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/build_rules/go/def.bzl b/tools/build_rules/go/def.bzl
index 32800ce553..0527d92bc3 100644
--- a/tools/build_rules/go/def.bzl
+++ b/tools/build_rules/go/def.bzl
@@ -348,7 +348,10 @@ go_library_attrs = {
),
"go_prefix": attr.label(
providers = ["go_prefix"],
- default = Label("//:go_prefix"),
+ default = Label(
+ "//:go_prefix",
+ relative_to_caller_repository = True,
+ ),
allow_files = False,
cfg = HOST_CFG,
),