# cpp

{% dynamic setvar source_file "src/main/java/com/google/devtools/build/lib/starlarkbuildapi/cpp/CppConfigurationApi.java" %} {% dynamic setvar version "7.2.0" %} {% dynamic setvar original_path "/rules/lib/fragments/cpp" %} {% include "_buttons.html" %} A configuration fragment for C++.

## Members

- apple_bitcode_mode
- apple_generate_dsym
- conlyopts
- copts
- custom_malloc
- cxxopts
- linkopts
- objc_generate_linkmap
- objc_should_strip_binary
- objccopts

## apple_bitcode_mode

    string cpp.apple_bitcode_mode

Deprecated: Returns the Bitcode mode to use for compilation steps. Always returns `'none'`.

## apple_generate_dsym

    bool cpp.apple_generate_dsym

Whether to generate Apple debug symbol(.dSYM) artifacts.

## conlyopts

    list cpp.conlyopts

The flags passed to Bazel by `--conlyopt` option.

## copts

    list cpp.copts

The flags passed to Bazel by `--copt` option.

## custom_malloc

    Label cpp.custom_malloc

Returns label pointed to by `--custom_malloc` option. Can be accessed with `configuration_field`:

    attr.label(
        default = configuration_field(
            fragment = "cpp",
            name = "custom_malloc"
        )
    )

May return `None`.

## cxxopts

    list cpp.cxxopts

The flags passed to Bazel by `--cxxopt` option.

## linkopts

    list cpp.linkopts

The flags passed to Bazel by `--linkopt` option.

## objc_generate_linkmap

    bool cpp.objc_generate_linkmap

(Apple-only) Whether to generate linkmap artifacts.

## objc_should_strip_binary

    bool cpp.objc_should_strip_binary

(Apple-only) whether to perform symbol and dead-code strippings on linked binaries.

## objccopts

    list cpp.objccopts

The flags passed to Bazel by `--objccopt` option.