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 31488ce1f47a1c..38e73767fd39f9 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 @@ -516,7 +516,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