File: compdb.md

package info (click to toggle)
golang-android-soong 0.0~git20201014.17e97d9-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 7,680 kB
  • sloc: python: 3,000; sh: 1,780; cpp: 66; makefile: 5
file content (27 lines) | stat: -rw-r--r-- 682 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Compdb (compile\_commands.json) Generator

Soong can generate compdb files. This is intended for use with editing tools
such as YouCompleteMe and other libclang based completers.

compdb file generation is enabled via environment variable:

```bash
$ export SOONG_GEN_COMPDB=1
$ export SOONG_GEN_COMPDB_DEBUG=1
```

One can make soong generate a symlink to the compdb file using an environment
variable:

```bash
$ export SOONG_LINK_COMPDB_TO=$ANDROID_HOST_OUT
```

You can then trigger an empty build:

```bash
$ make nothing
```

Note that if you build using mm or other limited makes with these environment
variables set the compdb will only include files in included modules.