mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-21 15:15:07 +00:00
Build
parent
7270fc32ea
commit
0c83a9af84
8
Build.md
8
Build.md
@ -4,7 +4,7 @@
|
||||
* GCC 7 or higher (`optional,string_view` require libstdc++7 or higher)
|
||||
* MSVC 2017 or higher (included with VS2017 Build Tools)
|
||||
|
||||
See [[Getting-started]] for simple cmake build instructions.
|
||||
See [[Getting-started]] for recommended configuration options for common systems.
|
||||
|
||||
You may append `-G Ninja -DCMAKE_CXX_LINK_FLAGS=-fuse-ld=lld -DCMAKE_CXX_COMPILER=clang++`
|
||||
|
||||
@ -17,12 +17,12 @@ are not supported at the moment.
|
||||
|
||||
* `-DCMAKE_BUILD_TYPE=(Debug|MinSizeRel|Release|RelWithDebInfo)`
|
||||
|
||||
Default: Release
|
||||
Default: Release
|
||||
Set the build type. The most important ones are Debug and Release.
|
||||
|
||||
* `-DSYSTEM_CLANG=(ON|OFF)`
|
||||
|
||||
Default: ON
|
||||
Default: ON
|
||||
Enable `SYSTEM_CLANG` if you want to link ccls against a system/local Clang instead of downloading Clang from releases.llvm.org during the configure process.
|
||||
|
||||
```
|
||||
@ -33,7 +33,7 @@ are not supported at the moment.
|
||||
* `-DCLANG_USE_BUNDLED_LIBC++=on`
|
||||
|
||||
`clang+llvm*` downloaded from releases.llvm.org also provides libc++ libraries.
|
||||
If your `libstdc++` is too old, you can use `libc++` in the bundled clang+llvm archive:
|
||||
This can be used on FreeBSD, but probably does not work on Linux due to conflict of libstdc++ (linked by clang+llvm libraries) and libc++.
|
||||
|
||||
```zsh
|
||||
# If your clang++ is old, you may rerun this command with clang++ replaced to
|
||||
|
@ -4,15 +4,17 @@ First of all, use a Debug [[Build]]. It is compiled with `-O0 -g` while the defa
|
||||
|
||||
`--log-file=/tmp/cc.log`
|
||||
|
||||
### Dump LSP requests/responses
|
||||
### stderr
|
||||
|
||||
Alternatively, enable logs and pass the `--log-all-to-stderr` option to the ccls executable (`bin/ccls --log-file=/tmp/cc.log --log-all-to-stderr`). You can find stderr output in:
|
||||
You can find stderr output in:
|
||||
|
||||
* LanguageClient-neovim: `/tmp/LanguageServer.log` (default)
|
||||
* Emacs lsp-mode: `*lsp-ccls stderr*` buffer. They will also go to `*message*` buffer if `(setq lsp-print-io t)`
|
||||
* VSCode: TODO
|
||||
|
||||
You can also use sysdig on Linux:
|
||||
### Dump LSP requests/responses
|
||||
|
||||
Use sysdig on Linux:
|
||||
```zsh
|
||||
sudo sysdig -As999 --unbuffered -p '%evt.type %proc.name %evt.buffer' "proc.exe contains ccls and fd.type=pipe" | egrep -v '^Content|^$'
|
||||
```
|
||||
|
@ -23,8 +23,10 @@ The executable is at `release/ccls`.
|
||||
|
||||
Additional notes: If your `libstdc++` is too old (no C++17 header files) or have an old GCC/Clang, you may use the `-DCLANG_USE_BUNDLED_LIBC++=on` command at [[Build]].
|
||||
|
||||
* FreeBSD 11, Linux with `clang+llvm<6`: `cmake -H. -Brelease -DCLANG_USE_BUNDLED_LIBC++=on`
|
||||
* FreeBSD 12, Linux with newer libstdc++/clang/llvm (e.g. Arch Linux): `cmake -H. -Brelease -DSYSTEM_CLANG=on -DUSE_SHARED_LLVM=on`
|
||||
* Arch Linux: `cmake -H. -Brelease -DUSE_SHARED_LLVM=on`. `-DUSE_SHARED_LLVM=on` (optional) makes linked executable smaller.
|
||||
[aur/ccls-git](https://aur.archlinux.org/packages/ccls-git) currently does not work as it links against `extra/clang=6.0.1-1` which has a [known issue](https://github.com/MaskRay/ccls/issues/30).
|
||||
* FreeBSD 11: `cmake -H. -Brelease -DCLANG_USE_BUNDLED_LIBC++=on`
|
||||
* FreeBSD 12, Linux with newer libstdc++ and clang>=6: `cmake -H. -Brelease -DSYSTEM_CLANG=on -DUSE_SHARED_LLVM=on`
|
||||
* Linux with `gcc < 7` but `clang >= 5`, `cmake -H. -Brelease -DCMAKE_CXX_COMPILER=clang++`
|
||||
|
||||
### Setup your editor
|
||||
|
4
Home.md
4
Home.md
@ -10,10 +10,10 @@ To tell ccls how to find the source tree in your project, you may create either
|
||||
|
||||
## Editor configuration
|
||||
|
||||
You need to set up a language client for your editor to use definition/reference/hover/... and for some advanced cquery features some extension is needed.
|
||||
You need to set up a language client for your editor to use definition/reference/hover/... and for some advanced ccls features some extension is needed.
|
||||
|
||||
## [[Initialization options]]
|
||||
|
||||
Customization of ccls, e.g. indexing comments, using msgpack for cache files.
|
||||
|
||||
Some tips for [[Debugging]]
|
||||
Some tips for [[Debugging]]
|
||||
|
Loading…
Reference in New Issue
Block a user