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