> ## Documentation Index
> Fetch the complete documentation index at: https://bazel-pr-30012.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# cpp

A configuration fragment for C++.

## Members

* [apple\_generate\_dsym](#apple_generate_dsym)
* [conlyopts](#conlyopts)
* [copts](#copts)
* [custom\_malloc](#custom_malloc)
* [cxxopts](#cxxopts)
* [linkopts](#linkopts)
* [objc\_generate\_linkmap](#objc_generate_linkmap)
* [objc\_should\_strip\_binary](#objc_should_strip_binary)
* [objccopts](#objccopts)

## 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`](/docs/user-manual#flag--conlyopt) option.

## copts

```
list cpp.copts
```

The flags passed to Bazel by [`--copt`](/docs/user-manual#flag--copt) option.

## custom\_malloc

```
Label cpp.custom_malloc
```

Returns label pointed to by [`--custom_malloc`](/docs/user-manual#flag--custom_malloc) option. Can be accessed with [`configuration_field`](../globals/bzl#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`](/docs/user-manual#flag--cxxopt) option.

## linkopts

```
list cpp.linkopts
```

The flags passed to Bazel by [`--linkopt`](/docs/user-manual#flag--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`](/docs/user-manual#flag--objccopt) option.
