Skip to main content
Utilities for C++ compilation, linking, and command line generation.

Members

action_is_enabled

Returns True if given action_config is enabled in the feature configuration.

Parameters

CcToolchainInfo

The key used to retrieve the provider that contains information about the C++ toolchain being used

compile

Should be used for C++ compilation. Returns tuple of (CompilationContext, CcCompilationOutputs).

Parameters

configure_features

Creates a feature_configuration instance. Requires the cpp configuration fragment.

Parameters

create_cc_toolchain_config_info

Creates a CcToolchainConfigInfo provider

Parameters

create_compilation_context

Creates a CompilationContext.

Parameters

create_compilation_outputs

Create compilation outputs object.

Parameters

create_compile_variables

Returns variables used for compilation actions.

Parameters

Creates LibraryToLink

Parameters

Returns link variables used for linking actions.

Parameters

create_linker_input

Creates a LinkerInput.

Parameters

create_linking_context

Creates a LinkingContext.

Parameters

create_linking_context_from_compilation_outputs

Should be used for creating library rules that can propagate information downstream in order to be linked later by a top level rule that does transitive linking to create an executable or a dynamic library. Returns tuple of (CcLinkingContext, CcLinkingOutputs).

Parameters

create_lto_compilation_context

Create LTO compilation context

Parameters

do_not_use_tools_cpp_compiler_present

Do not use this field, its only purpose is to help with migration from config_setting.values{‘compiler’) to config_settings.flag_values{‘@bazel_tools//tools/cpp:compiler’}

get_environment_variables

Returns environment variables to be set for given action.

Parameters

get_execution_requirements

Returns execution requirements for given action.

Parameters

get_memory_inefficient_command_line

Returns flattened command line flags for given action, using given variables for expansion. Flattens nested sets and ideally should not be used, or at least should not outlive analysis. Work on memory efficient function returning Args is ongoing.

Parameters

get_tool_for_action

Returns tool path for given action.

Parameters

is_enabled

Returns True if given feature is enabled in the feature configuration.

Parameters

Should be used for C++ transitive linking.

Parameters

merge_cc_infos

Merges multiple CcInfos into one.

Parameters

merge_compilation_contexts

Merges multiple CompilationContextss into one.

Parameters

merge_compilation_outputs

Merge compilation outputs.

Parameters