build

Fangrui Song 2018-11-03 14:37:14 -07:00
parent 5ad3013b60
commit 0df326a36a
2 changed files with 6 additions and 8 deletions

@ -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"]}}'