From e78dee6399fd97a430d94cc88c9a58c26916bdbb Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 29 Jul 2018 22:59:47 -0700 Subject: [PATCH] build --- Build.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Build.md b/Build.md index ea06be0..bfd552a 100644 --- a/Build.md +++ b/Build.md @@ -22,14 +22,29 @@ are not supported at the moment. * `-DSYSTEM_CLANG=(ON|OFF)` - Default: ON + Default: OFF Enable `SYSTEM_CLANG` if you want to link ccls against a system/local Clang instead of downloading Clang from releases.llvm.org during the configure process. ``` - % cmake -H. -Brelease -DCMAKE_INSTALL_PREFIX=/usr -DSYSTEM_CLANG=On - % cmake --build release + % cmake -H. -BRelease -DCMAKE_INSTALL_PREFIX=/usr -DSYSTEM_CLANG=On + % cmake --build Release ``` + cmake will download the releases.llvm.org archive for you. If you want to download it manually: + ```zsh + rm -r Release + mkdir Release + cd Release + # download clang+llvm-6.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz, verify with sha256sum and put it here + tar xf clang+llvm-6.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz + cd .. + # cmake -H. -BRelease ... + ``` + +* `-DCMAKE_CXX_COMPILER=/usr/bin/clang++` + +Build ccls with `/usr/bin/clang++`. You may use the absolute path of `Release/clang+llvm-*/bin/clang++` after clang+llvm archive is downloaded and extracted. + * `-DCLANG_USE_BUNDLED_LIBC++=on` `clang+llvm*` downloaded from releases.llvm.org also provides libc++ libraries.