blob: d0db6583ae75af2d267dfe2a3848ebd0b1b3d85d [file] [log] [blame]
Googler1d7c9eb2019-08-26 08:06:22 -07001# Copyright 2019 The Bazel Authors. All rights reserved.
Googler4a1c5782019-08-21 07:29:46 -07002#
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
Googler9ff1d1b2024-06-25 09:36:59 -070015load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16
Googler4a1c5782019-08-21 07:29:46 -070017package(default_visibility = ["//visibility:public"])
18
oquenchil03e7a772019-07-08 07:01:39 -070019licenses(["notice"]) # Apache 2.0
20
Googler4a1c5782019-08-21 07:29:46 -070021filegroup(
22 name = "all_files_for_testing",
23 srcs = glob(["**"]) + [
24 "//cc/private/rules_impl:srcs",
Googlerbc665f92023-01-11 02:47:44 -080025 "//cc/private/toolchain:srcs",
Googler4a1c5782019-08-21 07:29:46 -070026 ],
27)
28
29exports_files([
30 "defs.bzl",
31 "action_names.bzl",
Tony Aiuto3b4549e2022-08-26 15:46:53 -040032 "system_library.bzl",
Googler4a1c5782019-08-21 07:29:46 -070033])
34
35# The toolchain type used to distinguish cc toolchains.
Marcel Hlopkoe283f122019-05-27 09:09:16 +020036alias(
37 name = "toolchain_type",
38 actual = "@bazel_tools//tools/cpp:toolchain_type",
39)
oquenchil03e7a772019-07-08 07:01:39 -070040
Googler4a1c5782019-08-21 07:29:46 -070041filegroup(
42 name = "action_names_test_files",
43 testonly = True,
44 srcs = [
45 "BUILD",
46 "action_names.bzl",
47 ],
48 visibility = ["//visibility:public"],
49)
fweikert29da92c2019-09-13 18:24:56 +020050
Googlerfe8f0a42019-11-07 02:26:50 -080051filegroup(
UebelAndre0913abc2021-08-12 07:14:14 -070052 name = "bzl_srcs",
53 srcs = glob([
54 "**/*.bzl",
55 ]) + [
56 "//cc/private/rules_impl:bzl_srcs",
Googlerbc665f92023-01-11 02:47:44 -080057 "//cc/private/toolchain:bzl_srcs",
UebelAndre0913abc2021-08-12 07:14:14 -070058 ],
59 visibility = ["//visibility:public"],
60)
61
62filegroup(
Googlerfe8f0a42019-11-07 02:26:50 -080063 name = "srcs",
64 srcs = glob([
65 "**/*.bzl",
66 "**/BUILD",
67 ]) + [
68 "//cc/private/rules_impl:srcs",
Googlerbc665f92023-01-11 02:47:44 -080069 "//cc/private/toolchain:srcs",
Googlerfe8f0a42019-11-07 02:26:50 -080070 ],
71 visibility = ["//visibility:public"],
72)
73
fweikert29da92c2019-09-13 18:24:56 +020074# 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)
Googler262ebec2019-10-24 07:01:01 -070084
Googler9ff1d1b2024-06-25 09:36:59 -070085bzl_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"],
Googler0bc1ba52024-09-06 09:00:52 -0700100 visibility = ["//cc/toolchains:__subpackages__"],
Googler9ff1d1b2024-06-25 09:36:59 -0700101)
102
Googler262ebec2019-10-24 07:01:01 -0700103cc_toolchain_alias(name = "current_cc_toolchain")
104
Googler262ebec2019-10-24 07:01:01 -0700105cc_libc_top_alias(name = "current_libc_top")