diff --git a/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkRuleClassFunctions.java b/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkRuleClassFunctions.java index 6412ae7deff673..60e4acead8d247 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkRuleClassFunctions.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkRuleClassFunctions.java @@ -519,7 +519,9 @@ public static StarlarkRuleFunction createRule( } // Verify the child against parent's allowlist - if (parent != null && parent.getExtendableAllowlist() != null) { + if (parent != null + && parent.getExtendableAllowlist() != null + && !bzlFile.getRepository().getNameWithAt().equals("@_builtins")) { builder.addAllowlistChecker(EXTEND_RULE_ALLOWLIST_CHECKER); Attribute.Builder