> ## Documentation Index
> Fetch the complete documentation index at: https://bazel-pr-30827.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CcToolchainInfo {#modules.CcToolchainInfo}

Information about the C++ compiler being used.

## Members

* [all\_files](#all_files)
* [ar\_executable](#ar_executable)
* [built\_in\_include\_directories](#built_in_include_directories)
* [compiler](#compiler)
* [compiler\_executable](#compiler_executable)
* [cpu](#cpu)
* [dynamic\_runtime\_lib](#dynamic_runtime_lib)
* [gcov\_executable](#gcov_executable)
* [ld\_executable](#ld_executable)
* [libc](#libc)
* [needs\_pic\_for\_dynamic\_libraries](#needs_pic_for_dynamic_libraries)
* [nm\_executable](#nm_executable)
* [objcopy\_executable](#objcopy_executable)
* [objdump\_executable](#objdump_executable)
* [preprocessor\_executable](#preprocessor_executable)
* [static\_runtime\_lib](#static_runtime_lib)
* [strip\_executable](#strip_executable)
* [sysroot](#sysroot)
* [target\_gnu\_system\_name](#target_gnu_system_name)

<h2 id="all_files">
  all\_files
</h2>

```
None CcToolchainInfo.all_files
```

Returns all toolchain files (so they can be passed to actions using this toolchain as inputs).

<h2 id="ar_executable">
  ar\_executable
</h2>

```
None CcToolchainInfo.ar_executable
```

The path to the ar binary.

<h2 id="built_in_include_directories">
  built\_in\_include\_directories
</h2>

```
None CcToolchainInfo.built_in_include_directories
```

Returns the list of built-in directories of the compiler.

<h2 id="compiler">
  compiler
</h2>

```
None CcToolchainInfo.compiler
```

C++ compiler.

<h2 id="compiler_executable">
  compiler\_executable
</h2>

```
None CcToolchainInfo.compiler_executable
```

The path to the compiler binary.

<h2 id="cpu">
  cpu
</h2>

```
None CcToolchainInfo.cpu
```

Target CPU of the C++ toolchain.

<h2 id="dynamic_runtime_lib">
  dynamic\_runtime\_lib
</h2>

```
None CcToolchainInfo.dynamic_runtime_lib(*, feature_configuration)
```

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.

### Parameters

| Parameter               | Description                                    |
| ----------------------- | ---------------------------------------------- |
| `feature_configuration` | required  Feature configuration to be queried. |

<h2 id="gcov_executable">
  gcov\_executable
</h2>

```
None CcToolchainInfo.gcov_executable
```

The path to the gcov binary.

<h2 id="ld_executable">
  ld\_executable
</h2>

```
None CcToolchainInfo.ld_executable
```

The path to the ld binary.

<h2 id="libc">
  libc
</h2>

```
None CcToolchainInfo.libc
```

libc version string.

<h2 id="needs_pic_for_dynamic_libraries">
  needs\_pic\_for\_dynamic\_libraries
</h2>

```
None CcToolchainInfo.needs_pic_for_dynamic_libraries(*, feature_configuration)
```

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.

### Parameters

| Parameter               | Description                                    |
| ----------------------- | ---------------------------------------------- |
| `feature_configuration` | required  Feature configuration to be queried. |

<h2 id="nm_executable">
  nm\_executable
</h2>

```
None CcToolchainInfo.nm_executable
```

The path to the nm binary.

<h2 id="objcopy_executable">
  objcopy\_executable
</h2>

```
None CcToolchainInfo.objcopy_executable
```

The path to the objcopy binary.

<h2 id="objdump_executable">
  objdump\_executable
</h2>

```
None CcToolchainInfo.objdump_executable
```

The path to the objdump binary.

<h2 id="preprocessor_executable">
  preprocessor\_executable
</h2>

```
None CcToolchainInfo.preprocessor_executable
```

The path to the preprocessor binary.

<h2 id="static_runtime_lib">
  static\_runtime\_lib
</h2>

```
None CcToolchainInfo.static_runtime_lib(*, feature_configuration)
```

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.

### Parameters

| Parameter               | Description                                    |
| ----------------------- | ---------------------------------------------- |
| `feature_configuration` | required  Feature configuration to be queried. |

<h2 id="strip_executable">
  strip\_executable
</h2>

```
None CcToolchainInfo.strip_executable
```

The path to the strip binary.

<h2 id="sysroot">
  sysroot
</h2>

```
None CcToolchainInfo.sysroot
```

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 `None`.

<h2 id="target_gnu_system_name">
  target\_gnu\_system\_name
</h2>

```
None CcToolchainInfo.target_gnu_system_name
```

The GNU System Name.
