Add support for generating Compdb file
Some tools (i.e. you-complete-me) make use of a 'compdb' file
(compile_commands.json) that records (among other things) the
arguments needed to compile a file. These tools can use this with
libclang to provide semantic completions and perform other IDE
actions. This CL adds support for soong to generate a (simple)
compile_commands.json file.
Test: make SOONG_GEN_COMPDB=1 SOONG_LINK_COMPDB_TO=$ANDROID_BUILD_TOP nothing
examine $ANDROID_BUILD_TOP/compile_commands.json
Change-Id: I751bb344b90dfcdad1dfd71c2a85bacd345f0464
diff --git a/Android.bp b/Android.bp
index 5396664..aa65209 100644
--- a/Android.bp
+++ b/Android.bp
@@ -145,6 +145,7 @@
"cc/vndk_prebuilt.go",
"cc/cmakelists.go",
+ "cc/compdb.go",
"cc/compiler.go",
"cc/installer.go",
"cc/linker.go",