CcToolchainInfo

Report an issue View source Nightly · 7.4 . 7.3 · 7.2 · 7.1 · 7.0 · 6.5

Information about the C++ compiler being used.

Members

all_files

None CcToolchainInfo.all_files

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

ar_executable

None CcToolchainInfo.ar_executable

The path to the ar binary.

built_in_include_directories

None CcToolchainInfo.built_in_include_directories

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

compiler

None CcToolchainInfo.compiler

C++ compiler.

compiler_executable

None CcToolchainInfo.compiler_executable

The path to the compiler binary.

cpu

None CcToolchainInfo.cpu

Target CPU of the C++ toolchain.

dynamic_runtime_lib

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.

gcov_executable

None CcToolchainInfo.gcov_executable

The path to the gcov binary.

ld_executable

None CcToolchainInfo.ld_executable

The path to the ld binary.

libc

None CcToolchainInfo.libc

libc version string.

needs_pic_for_dynamic_libraries

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.

nm_executable

None CcToolchainInfo.nm_executable

The path to the nm binary.

objcopy_executable

None CcToolchainInfo.objcopy_executable

The path to the objcopy binary.

objdump_executable

None CcToolchainInfo.objdump_executable

The path to the objdump binary.

preprocessor_executable

None CcToolchainInfo.preprocessor_executable

The path to the preprocessor binary.

static_runtime_lib

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.

strip_executable

None CcToolchainInfo.strip_executable

The path to the strip binary.

sysroot

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.

target_gnu_system_name

None CcToolchainInfo.target_gnu_system_name

The GNU System Name.