Googler | 1d7c9eb | 2019-08-26 08:06:22 -0700 | [diff] [blame] | 1 | # Copyright 2019 The Bazel Authors. All rights reserved. |
Googler | 4a1c578 | 2019-08-21 07:29:46 -0700 | [diff] [blame] | 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 | |
Googler | 9ff1d1b | 2024-06-25 09:36:59 -0700 | [diff] [blame] | 15 | load("@bazel_skylib//:bzl_library.bzl", "bzl_library") |
| 16 | |
Googler | 4a1c578 | 2019-08-21 07:29:46 -0700 | [diff] [blame] | 17 | package(default_visibility = ["//visibility:public"]) |
| 18 | |
oquenchil | 03e7a77 | 2019-07-08 07:01:39 -0700 | [diff] [blame] | 19 | licenses(["notice"]) # Apache 2.0 |
| 20 | |
Googler | 4a1c578 | 2019-08-21 07:29:46 -0700 | [diff] [blame] | 21 | filegroup( |
| 22 | name = "all_files_for_testing", |
| 23 | srcs = glob(["**"]) + [ |
| 24 | "//cc/private/rules_impl:srcs", |
Googler | bc665f9 | 2023-01-11 02:47:44 -0800 | [diff] [blame] | 25 | "//cc/private/toolchain:srcs", |
Googler | 4a1c578 | 2019-08-21 07:29:46 -0700 | [diff] [blame] | 26 | ], |
| 27 | ) |
| 28 | |
| 29 | exports_files([ |
| 30 | "defs.bzl", |
| 31 | "action_names.bzl", |
Tony Aiuto | 3b4549e | 2022-08-26 15:46:53 -0400 | [diff] [blame] | 32 | "system_library.bzl", |
Googler | 4a1c578 | 2019-08-21 07:29:46 -0700 | [diff] [blame] | 33 | ]) |
| 34 | |
| 35 | # The toolchain type used to distinguish cc toolchains. |
Marcel Hlopko | e283f12 | 2019-05-27 09:09:16 +0200 | [diff] [blame] | 36 | alias( |
| 37 | name = "toolchain_type", |
| 38 | actual = "@bazel_tools//tools/cpp:toolchain_type", |
| 39 | ) |
oquenchil | 03e7a77 | 2019-07-08 07:01:39 -0700 | [diff] [blame] | 40 | |
Googler | 4a1c578 | 2019-08-21 07:29:46 -0700 | [diff] [blame] | 41 | filegroup( |
| 42 | name = "action_names_test_files", |
| 43 | testonly = True, |
| 44 | srcs = [ |
| 45 | "BUILD", |
| 46 | "action_names.bzl", |
| 47 | ], |
| 48 | visibility = ["//visibility:public"], |
| 49 | ) |
fweikert | 29da92c | 2019-09-13 18:24:56 +0200 | [diff] [blame] | 50 | |
Googler | fe8f0a4 | 2019-11-07 02:26:50 -0800 | [diff] [blame] | 51 | filegroup( |
UebelAndre | 0913abc | 2021-08-12 07:14:14 -0700 | [diff] [blame] | 52 | name = "bzl_srcs", |
| 53 | srcs = glob([ |
| 54 | "**/*.bzl", |
| 55 | ]) + [ |
| 56 | "//cc/private/rules_impl:bzl_srcs", |
Googler | bc665f9 | 2023-01-11 02:47:44 -0800 | [diff] [blame] | 57 | "//cc/private/toolchain:bzl_srcs", |
UebelAndre | 0913abc | 2021-08-12 07:14:14 -0700 | [diff] [blame] | 58 | ], |
| 59 | visibility = ["//visibility:public"], |
| 60 | ) |
| 61 | |
| 62 | filegroup( |
Googler | fe8f0a4 | 2019-11-07 02:26:50 -0800 | [diff] [blame] | 63 | name = "srcs", |
| 64 | srcs = glob([ |
| 65 | "**/*.bzl", |
| 66 | "**/BUILD", |
| 67 | ]) + [ |
| 68 | "//cc/private/rules_impl:srcs", |
Googler | bc665f9 | 2023-01-11 02:47:44 -0800 | [diff] [blame] | 69 | "//cc/private/toolchain:srcs", |
Googler | fe8f0a4 | 2019-11-07 02:26:50 -0800 | [diff] [blame] | 70 | ], |
| 71 | visibility = ["//visibility:public"], |
| 72 | ) |
| 73 | |
fweikert | 29da92c | 2019-09-13 18:24:56 +0200 | [diff] [blame] | 74 | # TODO(aiuto): Find a way to strip this rule from the distribution tarball. |
| 75 | filegroup( |
| 76 | name = "distribution", |
| 77 | srcs = glob([ |
| 78 | "**", |
| 79 | ]), |
| 80 | visibility = [ |
| 81 | "//distro:__pkg__", |
| 82 | ], |
| 83 | ) |
Googler | 262ebec | 2019-10-24 07:01:01 -0700 | [diff] [blame] | 84 | |
Googler | 9ff1d1b | 2024-06-25 09:36:59 -0700 | [diff] [blame] | 85 | bzl_library( |
| 86 | name = "find_cc_toolchain_bzl", |
| 87 | srcs = ["find_cc_toolchain.bzl"], |
| 88 | visibility = ["//visibility:public"], |
| 89 | ) |
| 90 | |
| 91 | bzl_library( |
| 92 | name = "action_names_bzl", |
| 93 | srcs = ["action_names.bzl"], |
| 94 | visibility = ["//visibility:public"], |
| 95 | ) |
| 96 | |
| 97 | bzl_library( |
| 98 | name = "cc_toolchain_config_lib_bzl", |
| 99 | srcs = ["cc_toolchain_config_lib.bzl"], |
Googler | 0bc1ba5 | 2024-09-06 09:00:52 -0700 | [diff] [blame] | 100 | visibility = ["//cc/toolchains:__subpackages__"], |
Googler | 9ff1d1b | 2024-06-25 09:36:59 -0700 | [diff] [blame] | 101 | ) |
| 102 | |
Googler | 262ebec | 2019-10-24 07:01:01 -0700 | [diff] [blame] | 103 | cc_toolchain_alias(name = "current_cc_toolchain") |
| 104 | |
Googler | 262ebec | 2019-10-24 07:01:01 -0700 | [diff] [blame] | 105 | cc_libc_top_alias(name = "current_libc_top") |