aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/genrule/GenRuleBaseRule.java
diff options
context:
space:
mode:
authorGravatar jcater <jcater@google.com>2018-06-19 10:17:16 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-06-19 10:18:40 -0700
commit191238f51dc9575c90baa20dd7ee4fd2b8cf2bec (patch)
treed7cdf331ebc4faba68a4a5c4b7469ed6b04c1474 /src/main/java/com/google/devtools/build/lib/rules/genrule/GenRuleBaseRule.java
parentd7bec2e36820928a436de2ecedec2b41c9fb419f (diff)
Make variable providers coming from the toolchains attribute shouldn't be
checked for restricted_to and compatible_with constraints, because they are part of the execution, not providing new dependencies. PiperOrigin-RevId: 201196891
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/genrule/GenRuleBaseRule.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/genrule/GenRuleBaseRule.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/genrule/GenRuleBaseRule.java b/src/main/java/com/google/devtools/build/lib/rules/genrule/GenRuleBaseRule.java
index c6f19a8fb4..0b4dcb925d 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/genrule/GenRuleBaseRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/genrule/GenRuleBaseRule.java
@@ -23,7 +23,6 @@ import static com.google.devtools.build.lib.syntax.Type.STRING;
import com.google.devtools.build.lib.analysis.BaseRuleClasses;
import com.google.devtools.build.lib.analysis.RuleDefinition;
import com.google.devtools.build.lib.analysis.RuleDefinitionEnvironment;
-import com.google.devtools.build.lib.analysis.TemplateVariableInfo;
import com.google.devtools.build.lib.analysis.config.HostTransition;
import com.google.devtools.build.lib.packages.Attribute;
import com.google.devtools.build.lib.packages.Attribute.ComputedDefault;
@@ -118,11 +117,6 @@ public class GenRuleBaseRule implements RuleDefinition {
.add(attr("tools", LABEL_LIST)
.cfg(HostTransition.INSTANCE)
.allowedFileTypes(FileTypeSet.ANY_FILE))
- .add(
- attr("toolchains", LABEL_LIST)
- .allowedFileTypes(FileTypeSet.NO_FILE)
- .mandatoryProviders(TemplateVariableInfo.PROVIDER.id())
- )
/* <!-- #BLAZE_RULE(genrule).ATTRIBUTE(outs) -->
A list of files generated by this rule.
<p>
@@ -273,7 +267,7 @@ public class GenRuleBaseRule implements RuleDefinition {
return RuleDefinition.Metadata.builder()
.name("$genrule_base")
.type(RuleClassType.ABSTRACT)
- .ancestors(BaseRuleClasses.RuleBase.class)
+ .ancestors(BaseRuleClasses.RuleBase.class, BaseRuleClasses.MakeVariableExpandingRule.class)
.build();
}
}