-
Notifications
You must be signed in to change notification settings - Fork 12k
/
Copy pathtoolchain_info.bzl
25 lines (22 loc) · 1.16 KB
/
toolchain_info.bzl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# look at the toolchains registered in the workspace file with nodejs_register_toolchains
# the name can be anything the user wants this is just added to the target to create unique names
# the order will match against the order in the TOOLCHAIN_VERSION list.
TOOLCHAINS_NAMES = [
"node20",
"node22",
]
# this is the list of toolchains that should be used and are registered with nodejs_register_toolchains in the WORKSPACE file
TOOLCHAINS_VERSIONS = [
select({
"@bazel_tools//src/conditions:linux_x86_64": "@node20_linux_amd64//:node_toolchain",
"@bazel_tools//src/conditions:darwin": "@node20_darwin_amd64//:node_toolchain",
"@bazel_tools//src/conditions:windows": "@node20_windows_amd64//:node_toolchain",
}),
select({
"@bazel_tools//src/conditions:linux_x86_64": "@node22_linux_amd64//:node_toolchain",
"@bazel_tools//src/conditions:darwin": "@node22_darwin_amd64//:node_toolchain",
"@bazel_tools//src/conditions:windows": "@node22_windows_amd64//:node_toolchain",
}),
]
# A default toolchain for use when only one is necessary
DEFAULT_TOOLCHAIN_VERSION = TOOLCHAINS_VERSIONS[len(TOOLCHAINS_VERSIONS) - 1]