Skip to content

Commit 9a59372

Browse files
committed
Limit visibility again
1 parent 0538f26 commit 9a59372

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

cc/toolchains/cc_toolchain_info.bzl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@
1313
# limitations under the License.
1414
"""All providers for rule-based bazel toolchain config."""
1515

16+
# Until the providers are stabilized, ensure that rules_cc is the only place
17+
# that can access the providers directly.
18+
# Once it's stabilized, we *may* consider opening up parts of the API, or we may
19+
# decide to just require users to use the public user-facing rules.
20+
visibility([
21+
"@local_config_cc/...",
22+
"//cc/toolchains/...",
23+
"//cc/private/toolchain/...",
24+
"//tests/rule_based_toolchain/...",
25+
])
26+
1627
# Note that throughout this file, we never use a list. This is because mutable
1728
# types cannot be stored in depsets. Thus, we type them as a sequence in the
1829
# provider, and convert them to a tuple in the constructor to ensure

cc/toolchains/impl/legacy_converter.bzl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ load(
2727
legacy_with_feature_set = "with_feature_set",
2828
)
2929

30+
visibility([
31+
"@local_config_cc/...",
32+
"//cc/toolchains/...",
33+
"//cc/private/toolchain/...",
34+
"//tests/rule_based_toolchain/...",
35+
])
36+
3037
# Note that throughout this file, we sort anything for which the order is
3138
# nondeterministic (eg. depset's .to_list(), dictionary iteration).
3239
# This allows our tests to call equals() on the output,

0 commit comments

Comments
 (0)