diff options
author | cpeyser <cpeyser@google.com> | 2017-09-01 00:15:29 +0200 |
---|---|---|
committer | Vladimir Moskva <vladmos@google.com> | 2017-09-01 12:28:36 +0200 |
commit | 8613c90911990431c7356a48b20504cba479ac4b (patch) | |
tree | 253cda56fba4621bebe571c852434f89716232b5 /src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java | |
parent | a117235b926eb477299436328a34ad4b1ea0eec0 (diff) |
Automated rollback of commit 2b983bdf508e010a3d4ee9dbaf446b7666749799.
*** Reason for rollback ***
Breaks rules_go CI
*** Original change description ***
Rollforward of c++ toolchain-relevant BUILD file and Bazel mocking changes. That is, a c++ toolchain is added, but a Bazel dependency on that toolchain is not.
PiperOrigin-RevId: 167198874
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java | 77 |
1 files changed, 29 insertions, 48 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java b/src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java index f52d66f209..817f4d163e 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java @@ -182,60 +182,41 @@ public class BaseRuleClasses { * Share common attributes across both base and Skylark base rules. */ public static RuleClass.Builder commonCoreAndSkylarkAttributes(RuleClass.Builder builder) { - return PlatformSemantics.platformAttributes(builder) + return builder // The visibility attribute is special: it is a nodep label, and loading the // necessary package groups is handled by {@link LabelVisitor#visitTargetVisibility}. // Package groups always have the null configuration so that they are not duplicated // needlessly. - .add( - attr("visibility", NODEP_LABEL_LIST) - .orderIndependent() - .cfg(HOST) - .nonconfigurable( - "special attribute integrated more deeply into Bazel's core logic")) - .add( - attr("deprecation", STRING) - .value(deprecationDefault) - .nonconfigurable("Used in core loading phase logic with no access to configs")) - .add( - attr("tags", STRING_LIST) - .orderIndependent() - .taggable() - .nonconfigurable("low-level attribute, used in TargetUtils without configurations")) - .add( - attr("generator_name", STRING) - .undocumented("internal") - .nonconfigurable("static structure of a rule")) - .add( - attr("generator_function", STRING) - .undocumented("internal") - .nonconfigurable("static structure of a rule")) - .add( - attr("generator_location", STRING) - .undocumented("internal") - .nonconfigurable("static structure of a rule")) - .add( - attr("testonly", BOOLEAN) - .value(testonlyDefault) - .nonconfigurable("policy decision: rules testability should be consistent")) + .add(attr("visibility", NODEP_LABEL_LIST).orderIndependent().cfg(HOST) + .nonconfigurable("special attribute integrated more deeply into Bazel's core logic")) + .add(attr("deprecation", STRING).value(deprecationDefault) + .nonconfigurable("Used in core loading phase logic with no access to configs")) + .add(attr("tags", STRING_LIST).orderIndependent().taggable() + .nonconfigurable("low-level attribute, used in TargetUtils without configurations")) + .add(attr("generator_name", STRING).undocumented("internal") + .nonconfigurable("static structure of a rule")) + .add(attr("generator_function", STRING).undocumented("internal") + .nonconfigurable("static structure of a rule")) + .add(attr("generator_location", STRING).undocumented("internal") + .nonconfigurable("static structure of a rule")) + .add(attr("testonly", BOOLEAN).value(testonlyDefault) + .nonconfigurable("policy decision: rules testability should be consistent")) .add(attr("features", STRING_LIST).orderIndependent()) .add(attr(":action_listener", LABEL_LIST).cfg(HOST).value(ACTION_LISTENER)) - .add( - attr(RuleClass.COMPATIBLE_ENVIRONMENT_ATTR, LABEL_LIST) - .allowedRuleClasses(EnvironmentRule.RULE_NAME) - .cfg(Attribute.ConfigurationTransition.HOST) - .allowedFileTypes(FileTypeSet.NO_FILE) - .dontCheckConstraints() - .nonconfigurable( - "special logic for constraints and select: see ConstraintSemantics")) - .add( - attr(RuleClass.RESTRICTED_ENVIRONMENT_ATTR, LABEL_LIST) - .allowedRuleClasses(EnvironmentRule.RULE_NAME) - .cfg(Attribute.ConfigurationTransition.HOST) - .allowedFileTypes(FileTypeSet.NO_FILE) - .dontCheckConstraints() - .nonconfigurable( - "special logic for constraints and select: see ConstraintSemantics")); + .add(attr(RuleClass.COMPATIBLE_ENVIRONMENT_ATTR, LABEL_LIST) + .allowedRuleClasses(EnvironmentRule.RULE_NAME) + .cfg(Attribute.ConfigurationTransition.HOST) + .allowedFileTypes(FileTypeSet.NO_FILE) + .dontCheckConstraints() + .nonconfigurable("special logic for constraints and select: see ConstraintSemantics") + ) + .add(attr(RuleClass.RESTRICTED_ENVIRONMENT_ATTR, LABEL_LIST) + .allowedRuleClasses(EnvironmentRule.RULE_NAME) + .cfg(Attribute.ConfigurationTransition.HOST) + .allowedFileTypes(FileTypeSet.NO_FILE) + .dontCheckConstraints() + .nonconfigurable("special logic for constraints and select: see ConstraintSemantics") + ); } public static RuleClass.Builder nameAttribute(RuleClass.Builder builder) { |