From fdeef5697ec92e7e38ee08553df22be1d4aaec99 Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Wed, 4 Feb 2026 09:59:22 +0100 Subject: [PATCH] Add rules_zig to the Starlarkification allowlist rules_zig needs to invoke `cc_common.link` with the `main_output` parameter when users request linking via the C toolchain. See motivation in https://github.com/aherrmann/rules_zig/issues/519#issuecomment-3302822718. rules_zig used to work around this issue with the same hack that rules_rust and rules_mojo applied, but this is no longer available as of Bazel 9.0.0, see https://github.com/aherrmann/rules_zig/issues/589. --- cc/common/cc_helper_internal.bzl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cc/common/cc_helper_internal.bzl b/cc/common/cc_helper_internal.bzl index a7373aac4..ebd470855 100644 --- a/cc/common/cc_helper_internal.bzl +++ b/cc/common/cc_helper_internal.bzl @@ -83,6 +83,8 @@ PRIVATE_STARLARKIFICATION_ALLOWLIST = [ ("rules_rust", "rust/private"), # Python rules ("", "third_party/bazel_rules/rules_python"), + # Zig rules + ("rules_zig", "zig/private"), # Various ("", "research/colab"), ("", "javatests/com/google/devtools/grok/kythe"),