diff options
author | Michal Gorny <mgorny@gentoo.org> | 2017-11-17 22:21:23 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2017-11-17 22:21:23 +0000 |
commit | b00e1d8997773f934dfe1f78c9185e3e66110477 (patch) | |
tree | 11b4963e818fae78258a4ced25e1d6c039d8bc29 /clang | |
parent | 0d7febf2dc0b9c7b6594fa2768d10b9d0415f67e (diff) |
[cmake] Use llvm-lit directory when provided for stand-alone build
After the recent lit test changes, clang attempts to run its tests
via llvm-lit by default. However, the llvm-lit binary is not present
when performing stand-alone build resulting in a failure out of the box.
To solve that, add the llvm-lit directory to CMake when performing
a stand-alone build and LLVM sources are provided. This includes
the CMake rules generating the llvm-lit binary and effectively makes
it possible for clang to use it.
Differential Revision: https://reviews.llvm.org/D40142
Diffstat (limited to 'clang')
-rw-r--r-- | clang/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index b5a245d0389..a60d11793a5 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -132,6 +132,9 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py) # Note: path not really used, except for checking if lit was found set(LLVM_LIT ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py) + if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/llvm-lit) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/llvm-lit utils/llvm-lit) + endif() if(NOT LLVM_UTILS_PROVIDED) add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/FileCheck utils/FileCheck) add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/count utils/count) |