diff --git a/src/main/java/com/google/devtools/build/lib/packages/BuiltinRestriction.java b/src/main/java/com/google/devtools/build/lib/packages/BuiltinRestriction.java index ceff3596478f90..72e19757dcbb4c 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/BuiltinRestriction.java +++ b/src/main/java/com/google/devtools/build/lib/packages/BuiltinRestriction.java @@ -49,6 +49,10 @@ public final class BuiltinRestriction { BuiltinRestriction.allowlistEntry("rules_android", ""), BuiltinRestriction.allowlistEntry("build_bazel_rules_android", ""), + // Cc rules + BuiltinRestriction.allowlistEntry("", "third_party/bazel_rules/rules_cc"), + BuiltinRestriction.allowlistEntry("rules_cc", ""), + // Java rules BuiltinRestriction.allowlistEntry("", "third_party/bazel_rules/rules_java"), BuiltinRestriction.allowlistEntry("rules_java", ""), diff --git a/src/main/starlark/builtins_bzl/common/cc/cc_common.bzl b/src/main/starlark/builtins_bzl/common/cc/cc_common.bzl index 38ec784e1308f6..2ac9f498506422 100644 --- a/src/main/starlark/builtins_bzl/common/cc/cc_common.bzl +++ b/src/main/starlark/builtins_bzl/common/cc/cc_common.bzl @@ -37,6 +37,8 @@ _PRIVATE_STARLARKIFICATION_ALLOWLIST = [ ("rules_android", ""), ("", "rust/private"), ("rules_rust", "rust/private"), + ("", "third_party/bazel_rules/rules_cc"), + ("rules_cc", ""), ] _BUILTINS = [("_builtins", "")]