mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-24 08:35:08 +00:00
build
parent
5ad3013b60
commit
0df326a36a
12
Build.md
12
Build.md
@ -103,15 +103,13 @@ Building ccls with MSVC 2017 and locally built LLVM+Clang on Windows does not wo
|
|||||||
|
|
||||||
MaskRay's config (building trunk LLVM at `~/llvm/Release/`):
|
MaskRay's config (building trunk LLVM at `~/llvm/Release/`):
|
||||||
|
|
||||||
```
|
```zsh
|
||||||
cd
|
|
||||||
git clone https://git.llvm.org/git/llvm.git
|
git clone https://git.llvm.org/git/llvm.git
|
||||||
cd llvm/tools
|
git clone https://git.llvm.org/git/clang.git llvm/tools/clang
|
||||||
git clone https://git.llvm.org/git/clang.git
|
cd llvm
|
||||||
cd ~/llvm
|
|
||||||
# create a build directory named `Release/`
|
# create a build directory named `Release/`
|
||||||
cmake -H. -BRelease -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_SHARED_LIBS=ON -DLLVM_ENABLE_LLD=ON -DLLVM_TARGETS_TO_BUILD=X86
|
cmake -H. -BRelease -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DLLVM_ENABLE_LLD=ON -DLLVM_TARGETS_TO_BUILD=X86
|
||||||
ninja -C Release clangIndex clangTooling
|
ninja -C Release clangFormat clangIndex clangTooling
|
||||||
```
|
```
|
||||||
|
|
||||||
* Remove `LLVM_ENABLE_LLD` if you don't have lld (a much faster linker than bfd/gold) installed
|
* Remove `LLVM_ENABLE_LLD` if you don't have lld (a much faster linker than bfd/gold) installed
|
||||||
|
@ -116,7 +116,7 @@ bear make -j bzImage modules
|
|||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
ccls -index ~/Dev/Linux -init='{"clang":{"excludeArgs":[
|
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",
|
"-falign-jumps=1","-falign-loops=1","-fconserve-stack","-fmerge-constants","-fno-code-hoisting","-fno-schedule-insns","-fno-sched-pressure","-fno-var-tracking-assignments","-fsched-pressure",
|
||||||
"-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",
|
"-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,-"
|
"--param=allow-store-data-races=0","-Wa,arch/x86/kernel/macros.s","-Wa,-"
|
||||||
], "extraArgs":["--gcc-toolchain=/usr"]}}'
|
], "extraArgs":["--gcc-toolchain=/usr"]}}'
|
||||||
|
Loading…
Reference in New Issue
Block a user