mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-24 16:45:07 +00:00
build
parent
e9a133c9dc
commit
e78dee6399
21
Build.md
21
Build.md
@ -22,14 +22,29 @@ are not supported at the moment.
|
|||||||
|
|
||||||
* `-DSYSTEM_CLANG=(ON|OFF)`
|
* `-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.
|
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 -H. -BRelease -DCMAKE_INSTALL_PREFIX=/usr -DSYSTEM_CLANG=On
|
||||||
% cmake --build release
|
% 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`
|
* `-DCLANG_USE_BUNDLED_LIBC++=on`
|
||||||
|
|
||||||
`clang+llvm*` downloaded from releases.llvm.org also provides libc++ libraries.
|
`clang+llvm*` downloaded from releases.llvm.org also provides libc++ libraries.
|
||||||
|
Loading…
Reference in New Issue
Block a user