From 0df326a36a2b21ff1cc09dc0e0686044d15f08ef Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 3 Nov 2018 14:37:14 -0700 Subject: [PATCH] build --- Build.md | 12 +++++------- compile_commands.json.md | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Build.md b/Build.md index 259cbc4..aca3830 100644 --- a/Build.md +++ b/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/`): -``` -cd +```zsh git clone https://git.llvm.org/git/llvm.git -cd llvm/tools -git clone https://git.llvm.org/git/clang.git -cd ~/llvm +git clone https://git.llvm.org/git/clang.git llvm/tools/clang +cd llvm # 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 -ninja -C Release clangIndex clangTooling +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 clangFormat clangIndex clangTooling ``` * Remove `LLVM_ENABLE_LLD` if you don't have lld (a much faster linker than bfd/gold) installed diff --git a/compile_commands.json.md b/compile_commands.json.md index bb53f56..db8202c 100644 --- a/compile_commands.json.md +++ b/compile_commands.json.md @@ -116,7 +116,7 @@ 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", +"-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", "--param=allow-store-data-races=0","-Wa,arch/x86/kernel/macros.s","-Wa,-" ], "extraArgs":["--gcc-toolchain=/usr"]}}'