From 7361bcccb3d561d1d8445fdbe21ed6f61fb4b07f Mon Sep 17 00:00:00 2001 From: hvadehra Date: Wed, 18 Sep 2024 20:21:40 +0200 Subject: [PATCH] [7.4.0] Add `@rules_cc` to the default API allowlist (#23661) PiperOrigin-RevId: 673946235 Change-Id: If20c63df2877aa948032d97795d88d960d9fa6bc (cherry picked from commit ff2e950b7a8cb763f36d2a679978c5f668160c78) --- .../devtools/build/lib/packages/BuiltinRestriction.java | 4 ++++ src/main/starlark/builtins_bzl/common/cc/cc_common.bzl | 2 ++ 2 files changed, 6 insertions(+) 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", "")]