1# Compdb (compile\_commands.json) Generator
2
3Soong can generate compdb files. This is intended for use with editing tools
4such as YouCompleteMe and other libclang based completers.
5
6compdb file generation is enabled via environment variable:
7
8```bash
9$ export SOONG_GEN_COMPDB=1
10$ export SOONG_GEN_COMPDB_DEBUG=1
11```
12
13One can make soong generate a symlink to the compdb file using an environment
14variable:
15
16```bash
17$ export SOONG_LINK_COMPDB_TO=$ANDROID_HOST_OUT
18```
19
20You can then trigger an empty build:
21
22```bash
23$ make nothing
24```
25
26Note that if you build using mm or other limited makes with these environment
27variables set the compdb will only include files in included modules.
28