Index: cmake/modules/AddLLVM.cmake =================================================================== --- cmake/modules/AddLLVM.cmake +++ cmake/modules/AddLLVM.cmake @@ -1083,10 +1083,11 @@ if (NOT CMAKE_CFG_INTDIR STREQUAL ".") list(APPEND LIT_ARGS --param build_mode=${CMAKE_CFG_INTDIR}) endif () - if (LLVM_MAIN_SRC_DIR) - set (LIT_COMMAND ${PYTHON_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py) + if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py) + set (LIT_COMMAND "${PYTHON_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py" + CACHE STRING "Command used to spawn llvm-lit") else() - find_program(LIT_COMMAND llvm-lit) + find_program(LIT_COMMAND llvm-lit lit.py lit) endif () list(APPEND LIT_COMMAND ${LIT_ARGS}) foreach(param ${ARG_PARAMS})