mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-30 19:37:08 +00:00
compile_commands.json: add clang.excludeArgs for Linux
parent
9ac6805e01
commit
5ad3013b60
@ -99,6 +99,15 @@ If your project is compiled with MSVC, you may change the compiler driver (`%cla
|
|||||||
|
|
||||||
See https://clang.llvm.org/docs/MSVCCompatibility.html
|
See https://clang.llvm.org/docs/MSVCCompatibility.html
|
||||||
|
|
||||||
|
### Standalone mode
|
||||||
|
|
||||||
|
ccls indexer can be used standalone. The following command indexes the project and creates `~/llvm/.ccls-cache/`.
|
||||||
|
If you have `clang.extraArgs`, make sure your client uses the same initialization option, otherwise cflags mismatch will cause re-indexing.
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
ccls -index ~/llvm -init='{"clang":{"extraArgs": ["--gcc-toolchain=/usr"]}}'
|
||||||
|
```
|
||||||
|
|
||||||
### Cases
|
### Cases
|
||||||
|
|
||||||
On a laptop with one (i7-6600U CPU @ 2.60GHz, hyper-threading, `nproc`=4), 4 indexers.
|
On a laptop with one (i7-6600U CPU @ 2.60GHz, hyper-threading, `nproc`=4), 4 indexers.
|
||||||
|
@ -114,6 +114,14 @@ yes '' | make config
|
|||||||
bear make -j bzImage modules
|
bear make -j bzImage modules
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
ccls -index ~/Dev/Linux -init='{"clang":{"excludeArgs":[
|
||||||
|
"-falign-jumps=1","-falign-loops=1","-fconserve-stack","-fmerge-constants","-fno-code-hoisting","-fno-schedule-insns","-fno-var-tracking-assignments",
|
||||||
|
"-mhard-float","-mindirect-branch-register","-mindirect-branch=thunk-inline","-mpreferred-stack-boundary=2","-mpreferred-stack-boundary=3","-mpreferred-stack-boundary=4","-mrecord-mcount","-mindirect-branch=thunk-extern","-mno-fp-ret-in-387","-mskip-rax-setup",
|
||||||
|
"--param=allow-store-data-races=0","-Wa,arch/x86/kernel/macros.s","-Wa,-"
|
||||||
|
], "extraArgs":["--gcc-toolchain=/usr"]}}'
|
||||||
|
```
|
||||||
|
|
||||||
### musl
|
### musl
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
|
Loading…
Reference in New Issue
Block a user