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.