summaryrefslogtreecommitdiff
path: root/docs/plugins.md
diff options
context:
space:
mode:
authorruki <[email protected]>2017-07-23 00:24:15 +0800
committerruki <[email protected]>2017-07-23 00:24:15 +0800
commit4e475c99d1fd2e8d180826b47a5a232db6377912 (patch)
tree578d9c3449dc34e93c51ff5785dacfdd9af7f9a6 /docs/plugins.md
parent4d727dd8bb0056275904ea20fc1cbc9c48901b8c (diff)
update docs about compiler
Diffstat (limited to 'docs/plugins.md')
-rw-r--r--docs/plugins.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/plugins.md b/docs/plugins.md
index fe0981f13..216c8a4ab 100644
--- a/docs/plugins.md
+++ b/docs/plugins.md
@@ -428,6 +428,28 @@ If you want to cancel multiline input, please input character `q`, for example:
$ xmake project -k makefile
```
+##### Generate compiler_commands
+
+We can export the compilation commands info of all source files and it is JSON compilation database format.
+
+```console
+$ xmake project -k compile_commands
+```
+
+The the content of the output file:
+
+```
+[
+ { "directory": "/home/user/llvm/build",
+ "command": "/usr/bin/clang++ -Irelative -DSOMEDEF=\"With spaces, quotes and \\-es.\" -c -o file.o file.cc",
+ "file": "file.cc" },
+ ...
+]
+
+```
+
+Please see [JSONCompilationDatabase](#https://clang.llvm.org/docs/JSONCompilationDatabase.html) if need known more info about `compile_commands`.
+
##### Generate VisualStudio Project
```bash