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

# cpp {#modules.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)

<h2 id="apple_generate_dsym">
  apple\_generate\_dsym
</h2>

```
bool cpp.apple_generate_dsym
```

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

<h2 id="conlyopts">
  conlyopts
</h2>

```
list cpp.conlyopts
```

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

<h2 id="copts">
  copts
</h2>

```
list cpp.copts
```

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

<h2 id="custom_malloc">
  custom\_malloc
</h2>

```
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`.

<h2 id="cxxopts">
  cxxopts
</h2>

```
list cpp.cxxopts
```

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

<h2 id="linkopts">
  linkopts
</h2>

```
list cpp.linkopts
```

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

<h2 id="objc_generate_linkmap">
  objc\_generate\_linkmap
</h2>

```
bool cpp.objc_generate_linkmap
```

(Apple-only) Whether to generate linkmap artifacts.

<h2 id="objc_should_strip_binary">
  objc\_should\_strip\_binary
</h2>

```
bool cpp.objc_should_strip_binary
```

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

<h2 id="objccopts">
  objccopts
</h2>

```
list cpp.objccopts
```

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