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

## copts

```
list cpp.copts
```

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

## custom\_malloc

```
Label cpp.custom_malloc
```

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

## linkopts

```
list cpp.linkopts
```

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