@@ -411,7 +411,10 @@ Here, we show an example for a semi-complicated toolchain suite, one that is:
411
411
Defining toolchains for this might look something like this:
412
412
413
413
```
414
+ # -------------------------------------------------------
414
415
# File: toolchain_impl/BUILD
416
+ # Contains the tool definitions (runtime, headers, libs).
417
+ # -------------------------------------------------------
415
418
load("@rules_python//python:py_cc_toolchain.bzl", "py_cc_toolchain")
416
419
load("@rules_python//python:py_exec_tools_toolchain.bzl", "py_exec_tools_toolchain")
417
420
load("@rules_python//python:py_runtime.bzl", "py_runtime")
@@ -453,9 +456,11 @@ cc_binary(name = "python3.12", ...)
453
456
cc_library(name = "headers", ...)
454
457
cc_library(name = "libs", ...)
455
458
459
+ # ------------------------------------------------------------------
456
460
# File: toolchains/BUILD
457
461
# Putting toolchain() calls in a separate package from the toolchain
458
- # implementations minimizes Bazel loading overhead
462
+ # implementations minimizes Bazel loading overhead.
463
+ # ------------------------------------------------------------------
459
464
460
465
toolchain(
461
466
name = "runtime_toolchain",
@@ -480,8 +485,10 @@ toolchain(
480
485
exec_comaptible_with = ["@platforms/os:linux"]
481
486
)
482
487
488
+ # -----------------------------------------------
483
489
# File: MODULE.bazel or WORKSPACE.bazel
484
- # These toolchains will considered before others
490
+ # These toolchains will considered before others.
491
+ # -----------------------------------------------
485
492
register_toolchains("//toolchains:all")
486
493
```
487
494
0 commit comments