• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16
17package(default_visibility = ["//visibility:public"])
18
19licenses(["notice"])  # Apache 2.0
20
21filegroup(
22    name = "all_files_for_testing",
23    srcs = glob(["**"]) + [
24        "//cc/private/rules_impl:srcs",
25        "//cc/private/toolchain:srcs",
26    ],
27)
28
29exports_files([
30    "defs.bzl",
31    "action_names.bzl",
32    "system_library.bzl",
33])
34
35# The toolchain type used to distinguish cc toolchains.
36alias(
37    name = "toolchain_type",
38    actual = "@bazel_tools//tools/cpp:toolchain_type",
39)
40
41filegroup(
42    name = "action_names_test_files",
43    testonly = True,
44    srcs = [
45        "BUILD",
46        "action_names.bzl",
47    ],
48    visibility = ["//visibility:public"],
49)
50
51filegroup(
52    name = "bzl_srcs",
53    srcs = glob([
54        "**/*.bzl",
55    ]) + [
56        "//cc/private/rules_impl:bzl_srcs",
57        "//cc/private/toolchain:bzl_srcs",
58    ],
59    visibility = ["//visibility:public"],
60)
61
62filegroup(
63    name = "srcs",
64    srcs = glob([
65        "**/*.bzl",
66        "**/BUILD",
67    ]) + [
68        "//cc/private/rules_impl:srcs",
69        "//cc/private/toolchain:srcs",
70    ],
71    visibility = ["//visibility:public"],
72)
73
74# TODO(aiuto): Find a way to strip this rule from the distribution tarball.
75filegroup(
76    name = "distribution",
77    srcs = glob([
78        "**",
79    ]),
80    visibility = [
81        "//distro:__pkg__",
82    ],
83)
84
85bzl_library(
86    name = "find_cc_toolchain_bzl",
87    srcs = ["find_cc_toolchain.bzl"],
88    visibility = ["//visibility:public"],
89)
90
91bzl_library(
92    name = "action_names_bzl",
93    srcs = ["action_names.bzl"],
94    visibility = ["//visibility:public"],
95)
96
97bzl_library(
98    name = "cc_toolchain_config_lib_bzl",
99    srcs = ["cc_toolchain_config_lib.bzl"],
100    visibility = ["//cc/toolchains:__subpackages__"],
101)
102
103cc_toolchain_alias(name = "current_cc_toolchain")
104
105# Use alias, because it doesn't build on Bazel 6.
106alias(
107    name = "optional_current_cc_toolchain",
108    actual = "//cc/private/bazel7:optional_current_cc_toolchain",
109)
110
111cc_libc_top_alias(name = "current_libc_top")
112