File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -444,8 +444,17 @@ toolchain(
444444 ],
445445 exec_comaptible_with = ["@platforms/os:linux"]
446446)
447+
448+ # File: MODULE.bazel or WORKSPACE.bazel
449+ # These toolchains will considered before others
450+ register_toolchains("//toolchains:all")
447451```
448452
453+ When registering custom toolchains, be aware of the the [ toolchain registration
454+ order] ( https://bazel.build/extending/toolchains#toolchain-resolution ) . In brief,
455+ toolchain order is the BFS-order of the modules; see the bazel docs for a more
456+ detailed description.
457+
449458:::{note}
450459The toolchain() calls should be in a separate BUILD file from everything else.
451460This avoids Bazel having to perform unnecessary work when it discovers the list
You can’t perform that action at this time.
0 commit comments