diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java index c2b622168e7018..2b9b245c592c95 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java +++ b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java @@ -2725,14 +2725,6 @@ public boolean isPackageMetadataRule() { // not building it today because the exact needs are not clear. return true; } - // BEGIN-INTERNAL - // TODO(aiuto): This is a Google-ism, remove from Bazel. - String packageName = ruleDefinitionEnvironmentLabel.getPackageName(); - if (packageName.startsWith("tools/build_defs/license") - || packageName.startsWith("third_party/rules_license")) { - return true; - } - // END-INTERNAL return false; } } diff --git a/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintSettingRule.java b/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintSettingRule.java index fe47d8f1974af1..7449ece8e92c3b 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintSettingRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintSettingRule.java @@ -43,7 +43,9 @@ public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env) constraint list (such as for a config_setting) that requires a particular value for that setting. */ - .add(attr(DEFAULT_CONSTRAINT_VALUE_ATTR, BuildType.NODEP_LABEL)) + .add( + attr(DEFAULT_CONSTRAINT_VALUE_ATTR, BuildType.NODEP_LABEL) + .nonconfigurable("constants must be consistent across configurations")) .build(); } diff --git a/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintValueRule.java b/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintValueRule.java index 1a34bff1929781..b716a0aa86bbf0 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintValueRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/platform/ConstraintValueRule.java @@ -42,7 +42,8 @@ public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env) .mandatory() .allowedRuleClasses(ConstraintSettingRule.RULE_NAME) .allowedFileTypes(FileTypeSet.NO_FILE) - .mandatoryProviders(ConstraintSettingInfo.PROVIDER.id())) + .mandatoryProviders(ConstraintSettingInfo.PROVIDER.id()) + .nonconfigurable("constants must be consistent across configurations")) .build(); }