Add '-DLLVM_ENABLE_PROJECTS=clang' in Build Clang+LLVM from the git monorepo section

shunlir 2020-04-01 14:54:46 +08:00
parent 2a418325c7
commit 8f55e5cf26

@ -296,7 +296,7 @@ ninja -C Release
git clone https://github.com/llvm/llvm-project.git
cd llvm-project
cmake -Hllvm -BRelease -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86
cmake -Hllvm -BRelease -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS=clang
ninja -C Release clangFormat clangFrontendTool clangIndex clangTooling clang
# built Release/bin/clang
```
@ -345,7 +345,7 @@ Similar to the instructions to build Clang+LLVM from the git monorepo:
# Download "LLVM source code" and rename the extracted directory to llvm
# Download "Clang source code" and rename the extracted directory to llvm/tools/clang
cd llvm
cmake -H. -BRelease -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86
cmake -H. -BRelease -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS=clang
ninja -C Release clangFormat clangFrontendTool clangIndex clangTooling clang
# built Release/bin/clang
```