Skip to main content
Information about the C++ compiler being used.

Members

all_files

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

ar_executable

The path to the ar binary.

built_in_include_directories

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

compiler

C++ compiler.

compiler_executable

The path to the compiler binary.

cpu

Target CPU of the C++ toolchain.

dynamic_runtime_lib

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

ParameterDescription
feature_configurationrequired Feature configuration to be queried.

gcov_executable

The path to the gcov binary.

ld_executable

The path to the ld binary.

libc

libc version string.

needs_pic_for_dynamic_libraries

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

ParameterDescription
feature_configurationrequired Feature configuration to be queried.

nm_executable

The path to the nm binary.

objcopy_executable

The path to the objcopy binary.

objdump_executable

The path to the objdump binary.

preprocessor_executable

The path to the preprocessor binary.

static_runtime_lib

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

ParameterDescription
feature_configurationrequired Feature configuration to be queried.

strip_executable

The path to the strip binary.

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

The GNU System Name.