diff options
author | Lukacs Berki <lberki@google.com> | 2015-07-27 08:19:13 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2015-07-27 08:34:51 +0000 |
commit | 44ba758ae03e6d4a43654f988d9536c9eafcac5e (patch) | |
tree | 68feca061b3acb436d55ee3f4bbac3b704f829a4 /src/main/java/com/google | |
parent | 053570758c3dd642118fcfcaa52198e277215dce (diff) |
Make default values of attributes point to the main repository.
Default values of attributes (e.g. "//tools/cpp:malloc" when an attribute declaration says .name("malloc").value("//tools/cpp:malloc")) are now considered as a label inside the main repository and not inside the external repository. This is consistent with how we treat implicit/default attributes and is useful because these are usually tool dependencies.
--
MOS_MIGRATED_REVID=99160392
Diffstat (limited to 'src/main/java/com/google')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/AbstractAttributeMapper.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/AbstractAttributeMapper.java b/src/main/java/com/google/devtools/build/lib/packages/AbstractAttributeMapper.java index 52f78abc80..bd091a1463 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/AbstractAttributeMapper.java +++ b/src/main/java/com/google/devtools/build/lib/packages/AbstractAttributeMapper.java @@ -156,7 +156,8 @@ public abstract class AbstractAttributeMapper implements AttributeMap { if (value != null) { // null values are particularly possible for computed defaults. for (Label label : type.getLabels(value)) { Label absoluteLabel; - if (attribute.isImplicit() || attribute.isLateBound()) { + if (attribute.isImplicit() || attribute.isLateBound() + || !attributes.isAttributeValueExplicitlySpecified(attribute)) { // Implicit dependencies are not usually present in remote repositories. They are // generally tools, which go to the main repository. absoluteLabel = label; |