From 0066b04dad389cefbce28932199724ae70621ae9 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 13 May 2018 21:36:16 -0700 Subject: [PATCH] . --- Build.md | 4 ++++ Getting-started.md | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Build.md b/Build.md index f8a7536..0364395 100644 --- a/Build.md +++ b/Build.md @@ -55,6 +55,10 @@ option: `-DCMAKE_PREFIX_PATH="C:/Program Files/LLVM"`. You may add directories for `include` and `lib` separated by a `;`, e.g. to use trunk clang: `-DCMAKE_PREFIX_PATH="$HOME/Dev/llvm/release;$HOME/Dev/llvm/tools/clang"` +* `-DUSE_SHARED_LLVM=on` + +Link against `libLLVM.so` instead of `libLLVMSupport.a libLLVMDemangle.a ...` + ## Windows If using Windows the automatically downloaded LLVM binaries are 64-bit; you should build cquery in 64-bit as well. You can tell cmake to build 64-bit using `-DCMAKE_GENERATOR_PLATFORM=x64` diff --git a/Getting-started.md b/Getting-started.md index d231578..ca03f5c 100644 --- a/Getting-started.md +++ b/Getting-started.md @@ -12,7 +12,7 @@ Detailed instructions at [[Build]]. git clone https://github.com/MaskRay/ccls --depth=1 cd ccls git submodule update --init -cmake -DCMAKE_BUILD_TYPE=Release -Brelease -H. +cmake -H. -Brelease cmake --build release ``` @@ -22,8 +22,8 @@ If your `libstdc++` is too old (no C++17 header files) or have an old GCC/Clang, * Mac OS X: [homebrew-ccls](https://github.com/twlz0ne/homebrew-ccls) * Arch Linux: [aur/ccls-git](https://aur.archlinux.org/packages/ccls-git) -* `cmake -H. -Brelease -DCLANG_USE_BUNDLED_LIBC++=on`, e.g. FreeBSD 11 -* `cmake -H. -Brelease`, Linux with newer libstdc++, e.g. Arch Linux, FreeBSD 12 +* `cmake -H. -Brelease -DCLANG_USE_BUNDLED_LIBC++=on`, FreeBSD 11, Linux with `clang+llvm<6` +* `cmake -H. -Brelease -DSYSTEM_CLANG=on -DUSE_SHARED_LLVM=on`, FreeBSD 12, Linux with newer libstdc++/clang/llvm, e.g. Arch Linux ### Setup your editor