When doing a standalone build, without setting LLDB_PATH_TO_LLVM_BUILD or LLDB_PATH_TO_CLANG_BUILD, you get the following error.
CMake Error at cmake/modules/LLDBStandalone.cmake:23 (find_package): Could not find a package configuration file provided by "LLVM" with any of the following names: LLVMConfig.cmake llvm-config.cmake Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set "LLVM_DIR" to a directory containing one of the above files. If "LLVM" provides a separate development package or SDK, be sure it has been installed.
This suggests setting LLVM_DIR to LLVM's install directory. However, LLDBStandalone.cmake takes LLDB_PATH_TO_LLVM_BUILD as its hint. As someone who isn't familiar with the standalone process, this is rather confusing. I propose removing LLDB_PATH_TO_LLVM_BUILD and LLDB_PATH_TO_CLANG_BUILD and use LLVM_DIR and Clang_DIR respectively.
@xiaobai Can this be changed to something like ${LLVM_DIR}/../../../NATIVE?