blob: 8a8d37f5f63e1b331f33904e862eccd5a506ea05 [file]
<html devsite>
<head>
<meta name="project_path" value="/_project.yaml">
<meta name="book_path" value="/versions/8.3.0/_book.yaml">
</head>
<body>
<h1 class="page-title" id="modules.CcToolchainInfo">CcToolchainInfo</h1>
{% dynamic setvar source_file "src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/CcToolchainProviderApi.java" %}
{% dynamic setvar version "8.3.0" %}
{% dynamic setvar original_path "/rules/lib/providers/CcToolchainInfo" %}
{% include "_buttons.html" %}
<!-- {% raw %} -->
Information about the C++ compiler being used.
<h2>Members</h2>
<ul>
<li>
<a href="#all_files">all_files</a>
</li>
<li>
<a href="#ar_executable">ar_executable</a>
</li>
<li>
<a href="#built_in_include_directories">built_in_include_directories</a>
</li>
<li>
<a href="#compiler">compiler</a>
</li>
<li>
<a href="#compiler_executable">compiler_executable</a>
</li>
<li>
<a href="#cpu">cpu</a>
</li>
<li>
<a href="#dynamic_runtime_lib">dynamic_runtime_lib</a>
</li>
<li>
<a href="#gcov_executable">gcov_executable</a>
</li>
<li>
<a href="#ld_executable">ld_executable</a>
</li>
<li>
<a href="#libc">libc</a>
</li>
<li>
<a href="#needs_pic_for_dynamic_libraries">needs_pic_for_dynamic_libraries</a>
</li>
<li>
<a href="#nm_executable">nm_executable</a>
</li>
<li>
<a href="#objcopy_executable">objcopy_executable</a>
</li>
<li>
<a href="#objdump_executable">objdump_executable</a>
</li>
<li>
<a href="#preprocessor_executable">preprocessor_executable</a>
</li>
<li>
<a href="#static_runtime_lib">static_runtime_lib</a>
</li>
<li>
<a href="#strip_executable">strip_executable</a>
</li>
<li>
<a href="#sysroot">sysroot</a>
</li>
<li>
<a href="#target_gnu_system_name">target_gnu_system_name</a>
</li>
</ul>
<h2 id="all_files">all_files</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.all_files</pre></p>
Returns all toolchain files (so they can be passed to actions using this toolchain as inputs).
<h2 id="ar_executable">ar_executable</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.ar_executable</pre></p>
The path to the ar binary.
<h2 id="built_in_include_directories">built_in_include_directories</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.built_in_include_directories</pre></p>
Returns the list of built-in directories of the compiler.
<h2 id="compiler">compiler</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.compiler</pre></p>
C++ compiler.
<h2 id="compiler_executable">compiler_executable</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.compiler_executable</pre></p>
The path to the compiler binary.
<h2 id="cpu">cpu</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.cpu</pre></p>
Target CPU of the C++ toolchain.
<h2 id="dynamic_runtime_lib">dynamic_runtime_lib</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.dynamic_runtime_lib(feature_configuration)</pre></p>
Returns the files from `dynamic_runtime_lib` attribute (so they can be passed to actions using this toolchain as inputs). The caller can check whether the feature_configuration enables `static_link_cpp_runtimes` feature (if not, neither `static_runtime_lib` nor `dynamic_runtime_lib` have to be used), and use `static_runtime_lib` if static linking mode is active.
<!-- 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="dynamic_runtime_lib.feature_configuration">
<code>feature_configuration</code>
</td>
<td>
required<br/>
Feature configuration to be queried.
</td>
</tr>
</tbody>
</table>
<h2 id="gcov_executable">gcov_executable</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.gcov_executable</pre></p>
The path to the gcov binary.
<h2 id="ld_executable">ld_executable</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.ld_executable</pre></p>
The path to the ld binary.
<h2 id="libc">libc</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.libc</pre></p>
libc version string.
<h2 id="needs_pic_for_dynamic_libraries">needs_pic_for_dynamic_libraries</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.needs_pic_for_dynamic_libraries(feature_configuration)</pre></p>
Returns true if this rule's compilations should apply -fPIC, false otherwise. Determines if we should apply -fPIC for this rule's C++ compilations depending on the C++ toolchain and presence of `--force_pic` Bazel option.
<!-- 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="needs_pic_for_dynamic_libraries.feature_configuration">
<code>feature_configuration</code>
</td>
<td>
required<br/>
Feature configuration to be queried.
</td>
</tr>
</tbody>
</table>
<h2 id="nm_executable">nm_executable</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.nm_executable</pre></p>
The path to the nm binary.
<h2 id="objcopy_executable">objcopy_executable</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.objcopy_executable</pre></p>
The path to the objcopy binary.
<h2 id="objdump_executable">objdump_executable</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.objdump_executable</pre></p>
The path to the objdump binary.
<h2 id="preprocessor_executable">preprocessor_executable</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.preprocessor_executable</pre></p>
The path to the preprocessor binary.
<h2 id="static_runtime_lib">static_runtime_lib</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.static_runtime_lib(feature_configuration)</pre></p>
Returns the files from `static_runtime_lib` attribute (so they can be passed to actions using this toolchain as inputs). The caller should check whether the feature_configuration enables `static_link_cpp_runtimes` feature (if not, neither `static_runtime_lib` nor `dynamic_runtime_lib` should be used), and use `dynamic_runtime_lib` if dynamic linking mode is active.
<!-- 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="static_runtime_lib.feature_configuration">
<code>feature_configuration</code>
</td>
<td>
required<br/>
Feature configuration to be queried.
</td>
</tr>
</tbody>
</table>
<h2 id="strip_executable">strip_executable</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.strip_executable</pre></p>
The path to the strip binary.
<h2 id="sysroot">sysroot</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.sysroot</pre></p>
Returns the sysroot to be used. If the toolchain compiler does not support different sysroots, or the sysroot is the same as the default sysroot, then this method returns <code>None</code>.
<h2 id="target_gnu_system_name">target_gnu_system_name</h2>
<p><pre class="rule-signature"><code>None</code> CcToolchainInfo.target_gnu_system_name</pre></p>
The GNU System Name.
</body>
</html>
<!-- {% endraw %} -->