Updated compile_commands.json (markdown)

Fangrui Song 2018-03-31 17:54:27 -07:00
parent 3e9f847b51
commit d6d7983b06

@ -47,7 +47,7 @@ ln -s build/compile_commands.json
### stdout of an external command ### stdout of an external command
You may use the initialization option `"compilationDatabaseCommand"` to provide the JSON compilation database. cquery will read its stdout rather than read `compile_commands.json`. This may be useful when cquery cannot parse the `compile_commands.json` correctly (e.g. MSVC cl.exe, Intel C++ Compiler options) You may use the initialization option `"compilationDatabaseCommand"` to provide the JSON compilation database. ccls will read its stdout rather than read `compile_commands.json`. This may be useful when ccls cannot parse the `compile_commands.json` correctly (e.g. MSVC cl.exe, Intel C++ Compiler options)
```sh ```sh
# extra command line option # extra command line option
@ -55,7 +55,7 @@ You may use the initialization option `"compilationDatabaseCommand"` to provide
``` ```
```elisp ```elisp
(setq cquery-extra-init-params '(:compilationDatabaseCommand "mycompdb")) (setq ccls-extra-init-params '(:compilationDatabaseCommand "mycompdb"))
``` ```
Suppose the project is at `/tmp/c`, `mycompdb /tmp/c` will be executed with stdin=initializationOptions and the stdout should be a JSON compilation database. Suppose the project is at `/tmp/c`, `mycompdb /tmp/c` will be executed with stdin=initializationOptions and the stdout should be a JSON compilation database.
@ -98,7 +98,3 @@ wget 'https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packa
yes '' | make config yes '' | make config
bear make -j bzImage modules bear make -j bzImage modules
``` ```
## Misc
`compile_commands.json` should reside in the project root because Emacs/VSCode plugins use it to indicate the project root, which will be used to initialize `InitializeParams.rootUri`.