docs/versions/7.4.0/rules/lib/toplevel/config_common.mdx
{% dynamic setvar source_file "src/main/java/com/google/devtools/build/lib/starlarkbuildapi/config/ConfigStarlarkCommonApi.java" %} {% dynamic setvar version "7.4.0" %} {% dynamic setvar original_path "/rules/lib/toplevel/config_common" %} {% include "_buttons.html" %}
<!-- {% raw %} -->Functions for Starlark to interact with Blaze's configurability APIs.
<h2>Members</h2> <ul> <li> <a href="#FeatureFlagInfo">FeatureFlagInfo</a> </li> <li> <a href="#toolchain_type">toolchain_type</a> </li> </ul> <h2 id="FeatureFlagInfo">FeatureFlagInfo</h2>
<p><pre class="rule-signature"><a class="anchor" href="../builtins/Provider.html">Provider</a> config_common.FeatureFlagInfo</pre></p>
The key used to retrieve the provider containing config_feature_flag's value.
<h2 id="toolchain_type">toolchain_type</h2>
<p><pre class="rule-signature"><a class="anchor" href="../builtins/toolchain_type.html">toolchain_type</a> config_common.toolchain_type(name, *, mandatory=True)</pre></p>
Declare a rule's dependency on a toolchain type.
<!-- hide-from-toc is a class used by DevSite for the public Bazel site
(https://developers.google.com/devsite/reference/styles/headings#hide_headings_from_the_toc) -->
<h3 class="hide-from-toc">Parameters</h3>
<table class="table table-bordered table-condensed table-params">
<colgroup>
<col class="col-param">
<col class="param-description">
</colgroup>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td id="toolchain_type.name">
<code>name</code>
</td>
<td>
<a class="anchor" href="../core/string.html">string</a>; or <a class="anchor" href="../builtins/Label.html">Label</a>;
required
The toolchain type that is required.
</td>
</tr>
<tr>
<td id="toolchain_type.mandatory">
<code>mandatory</code>
</td>
<td>
<a class="anchor" href="../core/bool.html">bool</a>;
default is <code>True</code>
Whether the toolchain type is mandatory or optional.
</td>
</tr>
</tbody>
</table>