|
3 | 3 | "//tools:build_defs.bzl",
|
4 | 4 | "IS_HOST_WINDOWS",
|
5 | 5 | "current_launcher_binary",
|
6 |
| - "current_launcher_maker_binary", |
7 | 6 | "single_binary_toolchain",
|
8 | 7 | )
|
9 | 8 |
|
10 | 9 | package(default_visibility = ["//visibility:public"])
|
11 | 10 |
|
12 |
| -current_launcher_binary(name = "launcher") |
13 |
| - |
14 |
| -current_launcher_maker_binary(name = "launcher_maker") |
| 11 | +# WARNING: These targets and toolchain types only exist for the purposes of |
| 12 | +# rulesets formerly included in Bazel itself and may change or be removed at any |
| 13 | +# time. |
15 | 14 |
|
16 |
| -# WARNING: These toolchain types and their associated toolchains only exist for |
17 |
| -# the purposes of rulesets formerly included in Bazel itself and may change or |
18 |
| -# be removed at any time. |
| 15 | +current_launcher_binary(name = "launcher") |
19 | 16 |
|
20 |
| -toolchain_type( |
21 |
| - name = "launcher_toolchain_type", |
22 |
| - visibility = ["//visibility:private"], |
| 17 | +# DEPRECATED: Use the `:launcher_maker_toolchain_type` toolchain instead to |
| 18 | +# avoid an unnecessary dependency on a C++ toolchain when building for a |
| 19 | +# non-Windows platform. |
| 20 | +filegroup( |
| 21 | + name = "launcher_maker", |
| 22 | + srcs = select({ |
| 23 | + ":is_host": ["launcher_maker.exe" if IS_HOST_WINDOWS else "//src/tools/launcher:launcher_maker"], |
| 24 | + "//conditions:default": ["//src/tools/launcher:launcher_maker"], |
| 25 | + }), |
23 | 26 | )
|
24 | 27 |
|
25 |
| -toolchain_type( |
26 |
| - name = "launcher_maker_toolchain_type", |
| 28 | +config_setting( |
| 29 | + name = "is_host", |
| 30 | + constraint_values = HOST_CONSTRAINTS, |
27 | 31 | visibility = ["//visibility:private"],
|
28 | 32 | )
|
29 | 33 |
|
| 34 | +toolchain_type(name = "launcher_toolchain_type") |
| 35 | + |
| 36 | +toolchain_type(name = "launcher_maker_toolchain_type") |
| 37 | + |
30 | 38 | # Toolchains are prefixed with a number to ensure that their order of definition
|
31 | 39 | # matches their precedence in the toolchain resolution process when registered
|
32 | 40 | # with a wildcard pattern (which sorts by name).
|
|
0 commit comments