build

Fangrui Song 2018-07-29 22:59:47 -07:00
parent e9a133c9dc
commit e78dee6399

@ -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.