@@ -411,7 +411,10 @@ Here, we show an example for a semi-complicated toolchain suite, one that is:
411411Defining toolchains for this might look something like this:
412412
413413```
414+ # -------------------------------------------------------
414415# File: toolchain_impl/BUILD
416+ # Contains the tool definitions (runtime, headers, libs).
417+ # -------------------------------------------------------
415418load("@rules_python//python:py_cc_toolchain.bzl", "py_cc_toolchain")
416419load("@rules_python//python:py_exec_tools_toolchain.bzl", "py_exec_tools_toolchain")
417420load("@rules_python//python:py_runtime.bzl", "py_runtime")
@@ -453,9 +456,11 @@ cc_binary(name = "python3.12", ...)
453456cc_library(name = "headers", ...)
454457cc_library(name = "libs", ...)
455458
459+ # ------------------------------------------------------------------
456460# File: toolchains/BUILD
457461# Putting toolchain() calls in a separate package from the toolchain
458- # implementations minimizes Bazel loading overhead
462+ # implementations minimizes Bazel loading overhead.
463+ # ------------------------------------------------------------------
459464
460465toolchain(
461466 name = "runtime_toolchain",
@@ -480,8 +485,10 @@ toolchain(
480485 exec_comaptible_with = ["@platforms/os:linux"]
481486)
482487
488+ # -----------------------------------------------
483489# File: MODULE.bazel or WORKSPACE.bazel
484- # These toolchains will considered before others
490+ # These toolchains will considered before others.
491+ # -----------------------------------------------
485492register_toolchains("//toolchains:all")
486493```
487494
0 commit comments