Clarifying how to use a custom-built LLVM

Fixes #1380
This commit is contained in:
Strahinja Val Markovic 2015-03-17 12:56:01 -07:00
parent 8f49e9b25c
commit efac682cd4

View File

@ -353,8 +353,13 @@ process.
`cmake` call will be a bit more complicated. We'll assume you downloaded a
binary distribution of LLVM+Clang from llvm.org in step 3 and that you
extracted the archive file to folder `~/ycm_temp/llvm_root_dir` (with `bin`,
`lib`, `include` etc. folders right inside that folder). With that in mind,
run the following command in the `ycm_build` directory:
`lib`, `include` etc. folders right inside that folder).
NOTE: This _only_ works with a _downloaded_ LLVM binary package, not a
custom-built LLVM! See docs below for `EXTERNAL_LIBCLANG_PATH` when using a
custom LLVM build.
With that in mind, run the following command in the `ycm_build` directory:
cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=~/ycm_temp/llvm_root_dir . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
@ -373,7 +378,8 @@ process.
You could also force the use of a custom libclang library with
`-DEXTERNAL_LIBCLANG_PATH=/path/to/libclang.so` flag (the library would end
with `.dylib` on a Mac). Again, this flag would be used _instead of_ the
other flags.
other flags. **If you compiled LLVM from source, this is the flag you should
be using.**
Running the `make` command will also place the `libclang.[so|dylib]` in the
`YouCompleteMe/third_party/ycmd` folder for you if you compiled with clang