xref: /aosp_15_r20/external/bazelbuild-rules_cc/cc/BUILD (revision eed53cd41c5909d05eedc7ad9720bb158fd93452)
1# Copyright 2019 The Bazel Authors. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#    http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15package(default_visibility = ["//visibility:public"])
16
17licenses(["notice"])  # Apache 2.0
18
19filegroup(
20    name = "all_files_for_testing",
21    srcs = glob(["**"]) + [
22        "//cc/private/rules_impl:srcs",
23        "//cc/private/toolchain:srcs",
24    ],
25)
26
27exports_files([
28    "defs.bzl",
29    "action_names.bzl",
30    "system_library.bzl",
31])
32
33# The toolchain type used to distinguish cc toolchains.
34alias(
35    name = "toolchain_type",
36    actual = "@bazel_tools//tools/cpp:toolchain_type",
37)
38
39filegroup(
40    name = "action_names_test_files",
41    testonly = True,
42    srcs = [
43        "BUILD",
44        "action_names.bzl",
45    ],
46    visibility = ["//visibility:public"],
47)
48
49filegroup(
50    name = "bzl_srcs",
51    srcs = glob([
52        "**/*.bzl",
53    ]) + [
54        "//cc/private/rules_impl:bzl_srcs",
55        "//cc/private/toolchain:bzl_srcs",
56    ],
57    visibility = ["//visibility:public"],
58)
59
60filegroup(
61    name = "srcs",
62    srcs = glob([
63        "**/*.bzl",
64        "**/BUILD",
65    ]) + [
66        "//cc/private/rules_impl:srcs",
67        "//cc/private/toolchain:srcs",
68    ],
69    visibility = ["//visibility:public"],
70)
71
72# TODO(aiuto): Find a way to strip this rule from the distribution tarball.
73filegroup(
74    name = "distribution",
75    srcs = glob([
76        "**",
77    ]),
78    visibility = [
79        "//distro:__pkg__",
80    ],
81)
82
83cc_toolchain_alias(name = "current_cc_toolchain")
84
85cc_libc_top_alias(name = "current_libc_top")
86