blob: 66de9f589c9b11020c4168f87599788a15ecdfb0 [file] [log] [blame]
Tim Windelschmidt590239d2025-04-15 17:35:22 +02001load("@rules_perl//perl:toolchain.bzl", "perl_toolchain")
Tim Windelschmidt5d357d82025-07-10 18:47:15 +02002load("@rules_python//python:py_exec_tools_toolchain.bzl", "py_exec_tools_toolchain")
3load("@rules_python//python:py_runtime.bzl", "py_runtime")
4load("@rules_python//python:py_runtime_pair.bzl", "py_runtime_pair")
Tim Windelschmidt03dadba2025-07-09 06:58:03 +02005load(":toolchain.bzl", "SUPPORTED_TARGETS", "TOOLCHAINS", "toolchain_for")
Tim Windelschmidt98000a52025-03-06 14:22:15 +01006
7package(default_visibility = ["//visibility:public"])
8
9[
10 toolchain_for(
11 name = name,
12 config = config,
13 )
14 for name, config in TOOLCHAINS.items()
15]
Tim Windelschmidt590239d2025-04-15 17:35:22 +020016
Tim Windelschmidt5d357d82025-07-10 18:47:15 +020017[
18 [
19 py_runtime(
20 name = "rules_python_%s_python3_12_runtime" % target.tuple,
21 interpreter = "@toolchain-bundle-%s//:python3.12" % target.triple,
22 interpreter_version_info = {
23 "major": str(3),
24 "minor": str(12),
25 "micro": str(0),
26 },
27 python_version = "PY3",
28 ),
29 py_runtime_pair(
30 name = "rules_python_%s_python3_12_runtime_pair" % target.tuple,
31 py3_runtime = ":rules_python_%s_python3_12_runtime" % target.tuple,
32 ),
33 py_exec_tools_toolchain(
34 name = "rules_python_%s_python3_12_exec_tools_toolchain_impl" % target.tuple,
35 exec_interpreter = ":rules_python_%s_python3_12_runtime_pair" % target.tuple,
36 ),
37 toolchain(
38 name = "rules_python_%s_python3_12_runtime_toolchain" % target.tuple,
39 exec_compatible_with = target.constrain,
40 toolchain = ":rules_python_%s_python3_12_runtime_pair" % target.tuple,
41 toolchain_type = "@rules_python//python:toolchain_type",
42 ),
43 toolchain(
44 name = "rules_python_%s_python3_12_exec_tools_toolchain" % target.tuple,
45 exec_compatible_with = target.constrain,
46 toolchain = ":rules_python_%s_python3_12_exec_tools_toolchain_impl" % target.tuple,
47 toolchain_type = "@rules_python//python:exec_tools_toolchain_type",
48 ),
49 ]
50 for target in SUPPORTED_TARGETS
51]
52
Tim Windelschmidt03dadba2025-07-09 06:58:03 +020053# rules_perl wiring
Tim Windelschmidt590239d2025-04-15 17:35:22 +020054
Tim Windelschmidt03dadba2025-07-09 06:58:03 +020055[
56 [
57 perl_toolchain(
58 name = "rules_perl_%s_toolchain_impl" % target.tuple,
59 runtime = [
60 "@toolchain-bundle-%s//:perl_runtime" % target.triple,
61 ],
62 ),
63 toolchain(
64 name = "rules_perl_%s_toolchain" % target.tuple,
65 exec_compatible_with = target.constrain,
66 toolchain = ":rules_perl_%s_toolchain_impl" % target.tuple,
67 toolchain_type = "@rules_perl//perl:toolchain_type",
68 ),
69 ]
70 for target in SUPPORTED_TARGETS
71]