Skip to content

Commit 6d26834

Browse files
jbcoecopybara-github
authored andcommitted
Refactor visibility to make it easier to add new packages without churn upstream.
PiperOrigin-RevId: 900104636 Change-Id: Ibee15bfff933f9189e9c6b06bc0e9ae1b2602574
1 parent 8414b93 commit 6d26834

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

cc/common/cc_helper_internal.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Only use those within C++ implementation. The others need to go through cc_commo
1818
"""
1919

2020
load("@bazel_skylib//lib:paths.bzl", "paths")
21+
load("//cc/common:visibility.bzl", "PRIVATE_RULES_ALLOWLIST")
2122
load("//cc/private:cc_internal.bzl", _cc_internal = "cc_internal")
2223
load("//cc/private:paths.bzl", "is_path_absolute")
2324

@@ -86,7 +87,7 @@ PRIVATE_STARLARKIFICATION_ALLOWLIST = [
8687
# Various
8788
("", "research/colab"),
8889
("", "javatests/com/google/devtools/grok/kythe"),
89-
] + CREATE_COMPILE_ACTION_API_ALLOWLISTED_PACKAGES
90+
] + CREATE_COMPILE_ACTION_API_ALLOWLISTED_PACKAGES + PRIVATE_RULES_ALLOWLIST
9091

9192
# LINT.ThenChange(https://github.com/bazelbuild/bazel/blob/master/src/main/starlark/builtins_bzl/common/cc/cc_helper_internal.bzl:forked_exports)
9293

cc/common/visibility.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
"""Bzl load visibility package specs"""
22

33
INTERNAL_VISIBILITY = ["public"]
4+
5+
PRIVATE_RULES_VISIBILITY_FOR_BZL = []
6+
7+
PRIVATE_RULES_VISIBILITY_FOR_BUILD = []
8+
9+
PRIVATE_RULES_ALLOWLIST = []

0 commit comments

Comments
 (0)