Add documentation for the toolchains= attribute.
RELNOTES: None.
PiperOrigin-RevId: 199333903
diff --git a/src/main/java/com/google/devtools/build/docgen/PredefinedAttributes.java b/src/main/java/com/google/devtools/build/docgen/PredefinedAttributes.java
index fddbf78..03e711e 100644
--- a/src/main/java/com/google/devtools/build/docgen/PredefinedAttributes.java
+++ b/src/main/java/com/google/devtools/build/docgen/PredefinedAttributes.java
@@ -53,6 +53,7 @@
"templates/attributes/common/restricted_to.html",
"templates/attributes/common/tags.html",
"templates/attributes/common/testonly.html",
+ "templates/attributes/common/toolchains.html",
"templates/attributes/common/visibility.html");
/**
diff --git a/src/main/java/com/google/devtools/build/docgen/templates/attributes/common/toolchains.html b/src/main/java/com/google/devtools/build/docgen/templates/attributes/common/toolchains.html
new file mode 100644
index 0000000..bf5d95d
--- /dev/null
+++ b/src/main/java/com/google/devtools/build/docgen/templates/attributes/common/toolchains.html
@@ -0,0 +1,15 @@
+<p><code>List of <a href="../build-ref.html#labels">labels</a>; optional</code></p>
+
+<p>
+The set of <a href="../toolchains.html">toolchains</a> this rule has access to.
+</p>
+
+</p>Targets listed here are the set of toolchains whose <a href="${link make-variables}">Make
+variables</a> the rule is allowed to access.</a> These rules are either rules that provide
+the <code>TemplateVariableInfo</code> provider or special targets for toolchain types built into
+Bazel. These include:
+
+<ul>
+ <li><code>@bazel_tools//tools/cpp:current_cc_toolchain</code>
+ <li><code>@bazel_tools//tools/cpp:current_java_runtime</code>
+ </ul>