xref: /aosp_15_r20/external/grpc-grpc/third_party/toolchains/BUILD (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1# Copyright 2017 gRPC authors.
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
15licenses(["notice"])  # Apache v2
16
17package(default_visibility = ["//visibility:public"])
18
19load("@bazel_toolchains//rules/exec_properties:exec_properties.bzl", "create_rbe_exec_properties_dict")
20
21# The default toolchain suite for RBE linux, pass it to --crosstool_top
22alias(
23    name = "rbe_linux_default_toolchain_suite",
24    actual = "//third_party/toolchains/rbe_ubuntu2004/cc:toolchain",
25)
26
27# The default CC toolchain suite for RBE linux
28alias(
29    name = "rbe_linux_default_cc_toolchain",
30    actual = "//third_party/toolchains/rbe_ubuntu2004/config:cc-toolchain",
31)
32
33# The default platform for RBE Linux
34platform(
35	name = "rbe_linux_default_platform",
36    # Inherit from the platform target generated by 'rbe_configs_gen'.
37	parents = ["//third_party/toolchains/rbe_ubuntu2004/config:platform"],
38	exec_properties = create_rbe_exec_properties_dict(
39        docker_add_capabilities = "SYS_PTRACE",
40        docker_privileged = True,
41        # by default, all RBE actions will run on "small" workers.
42        # For individual targets, this can be overridden by adding the "exec_properties = LARGE_MACHINE"
43        # attribute.
44        labels = {
45            "os": "ubuntu",
46            "machine_size": "small",
47        },
48        os_family = "Linux",
49    ),
50)
51
52# The default toolchain suite for RBE windows, pass it to --crosstool_top
53alias(
54    name = "rbe_windows_default_toolchain_suite",
55    actual = "//third_party/toolchains/rbe_windows_bazel_6.3.2_vs2019/cc:toolchain",
56)
57
58# The default CC toolchain suite for RBE windows
59alias(
60    name = "rbe_windows_default_cc_toolchain",
61    actual = "//third_party/toolchains/rbe_windows_bazel_6.3.2_vs2019/config:cc-toolchain",
62)
63
64# The default platform for RBE windows
65platform(
66    name = "rbe_windows_default_platform",
67    # Inherit from the platform target generated by 'rbe_configs_gen'.
68	parents = ["//third_party/toolchains/rbe_windows_bazel_6.3.2_vs2019/config:platform"],
69    exec_properties = create_rbe_exec_properties_dict(
70        os_family = "Windows",
71        # by default, all RBE actions will run on "small" workers.
72        labels = {"os": "windows_2019", "machine_size": "small"},
73    ),
74)
75