cpp

A configuration fragment for C++.

ar_executable

string cpp.ar_executable

Deprecated (use CcToolchainInfo instead). Path to GNU binutils 'ar' binary.

built_in_include_directories

list cpp.built_in_include_directories

Deprecated (use CcToolchainInfo instead). Built-in system include paths for the toolchain compiler. All paths in this list should be relative to the exec directory. They may be absolute if they are also installed on the remote build nodes or for local compilation.

c_options

list cpp.c_options

Deprecated (use methods in cc_common instead). Returns the list of additional C-specific options to use for compiling C. These should be go on the command line after the common options returned by compiler_options

compiler

string cpp.compiler

Deprecated (use CcToolchainInfo instead). C++ compiler.

compiler_executable

string cpp.compiler_executable

Deprecated (use CcToolchainInfo instead). Path to C/C++ compiler binary.

compiler_options

list cpp.compiler_options(features)

Deprecated (use methods in cc_common instead). Returns the default options to use for compiling C, C++, and assembler. This is just the options that should be used for all three languages. There may be additional C-specific or C++-specific options that should be used, in addition to the ones returned by this method

Parameters

Parameter Description
features

sequence

Unused.

conlyopts

list cpp.conlyopts

Returns flags passed to Bazel by --conlyopt option.

copts

list cpp.copts

Returns flags passed to Bazel by --copt option.

cpu

string cpp.cpu

Deprecated (use CcToolchainInfo instead). Target CPU of the C++ toolchain.

cxx_options

list cpp.cxx_options(features)

Deprecated (use methods in cc_common instead). Returns the list of additional C++-specific options to use for compiling C++. These should be go on the command line after the common options returned by compiler_options

Parameters

Parameter Description
features

sequence

Unused.

cxxopts

list cpp.cxxopts

Returns flags passed to Bazel by --cxxopt option.

list cpp.dynamic_link_options(features, shared_lib)

Deprecated (use methods in cc_common instead). Returns the immutable list of linker options for artifacts that are not fully or mostly statically linked. Does not include command-line options passed via --linkopt or --linkopts.

Parameters

Parameter Description

sequence

Unused.

bool

If true, returns the link options for a shared library.

list cpp.fully_static_link_options(features, shared_lib)

Deprecated (use methods in cc_common instead). Returns the immutable list of linker options for fully statically linked outputs. Does not include command-line options passed via --linkopt or --linkopts.

Parameters

Parameter Description

sequence

Unused.

bool

If true, returns the link options for a shared library.

ld_executable

string cpp.ld_executable

Deprecated (use CcToolchainInfo instead). Path to the linker binary.

libc

string cpp.libc

Deprecated (use CcToolchainInfo instead). libc version string.

list cpp.link_options

Deprecated (use methods in cc_common instead). Returns the set of command-line linker options, including any flags inferred from the command-line options.

linkopts

list cpp.linkopts

Returns flags passed to Bazel by --linkopt option.

list cpp.mostly_static_link_options(features, shared_lib)

Deprecated (use methods in cc_common instead). Returns the immutable list of linker options for mostly statically linked outputs. Does not include command-line options passed via --linkopt or--linkopts.

Parameters

Parameter Description

sequence

Unused.

bool

If true, returns the link options for a shared library.

nm_executable

string cpp.nm_executable

Deprecated (use CcToolchainInfo instead). Path to GNU binutils 'nm' binary.

objcopy_executable

string cpp.objcopy_executable

Deprecated (use CcToolchainInfo instead). Path to GNU binutils 'objcopy' binary.

objdump_executable

string cpp.objdump_executable

Deprecated (use CcToolchainInfo instead). Path to GNU binutils 'objdump' binary.

preprocessor_executable

string cpp.preprocessor_executable

Deprecated (use CcToolchainInfo instead). Path to C/C++ preprocessor binary.

strip_executable

string cpp.strip_executable

Deprecated (use CcToolchainInfo instead). Path to GNU binutils 'strip' binary.

sysroot

string cpp.sysroot

Deprecated (use CcToolchainInfo instead). 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

string cpp.target_gnu_system_name

Deprecated (use CcToolchainInfo instead). The GNU System Name.

unfiltered_compiler_options

list cpp.unfiltered_compiler_options(features)

Deprecated (use methods in cc_common instead). Returns the default list of options which cannot be filtered by BUILD rules. These should be appended to the command line after filtering.

Parameters

Parameter Description
features

sequence

Unused.