[LLD][CMake] fix testing standalone build without installed llvm-lit. (#138575)

This block was copied from clang/CMakeLists.txt.
This commit is contained in:
jeremyd2019 2025-05-07 12:28:11 -07:00 committed by GitHub
parent 93aba1e240
commit 16107c88fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,6 +63,9 @@ if(LLD_BUILT_STANDALONE)
if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
# Note: path not really used, except for checking if lit was found
set(LLVM_EXTERNAL_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/not utils/not)