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