llvm.org GIT mirror llvm / fd4d285
Make libcxx tests work when llvm sources are not present. Despite a strong CMake warning that this is an unsupported libcxx build configuration, some bots still rely on being able to check out lit and libcxx independently with no LLVM sources, and then run lit against libcxx. A previous patch broke that workflow, so this is making it work again. Unfortunately, it breaks generation of the llvm-lit script for libcxx, but we will just have to live with that until a solution is found that allows libcxx to make more use of llvm build pieces. libcxx can still run tests by using the ninja check target, or by running lit.py directly against the build tree or source tree. Differential Revision: https://reviews.llvm.org/D38057 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313763 91177308-0d34-0410-b5e6-96231b3b80d8 Zachary Turner 2 years ago
1 changed file(s) with 6 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
11971197 cmake_parse_arguments(ARG "ALLOW_EXTERNAL" "" "" ${ARGN})
11981198
11991199 if (ARG_ALLOW_EXTERNAL)
1200 set(LLVM_DEFAULT_EXTERNAL_LIT "${LLVM_EXTERNAL_LIT}")
12001201 set (LLVM_EXTERNAL_LIT "" CACHE STRING "Command used to spawn lit")
1202 if ("${LLVM_EXTERNAL_LIT}" STREQUAL "")
1203 set(LLVM_EXTERNAL_LIT "${LLVM_DEFAULT_EXTERNAL_LIT}")
1204 endif()
1205
12011206 if (NOT "${LLVM_EXTERNAL_LIT}" STREQUAL "")
12021207 if (EXISTS ${LLVM_EXTERNAL_LIT})
12031208 get_filename_component(LIT_FILE_NAME ${LLVM_EXTERNAL_LIT} NAME)
12291234 elseif(NOT "${LLVM_RUNTIME_OUTPUT_INTDIR}" STREQUAL "")
12301235 set(LLVM_LIT_BASE_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
12311236 else()
1232 message(WARNING "Could not find suitable output location for llvm-lit."
1233 "Using default ${CMAKE_CURRENT_BINARY_DIR}/llvm-lit")
1234 set(LLVM_LIT_BASE_DIR ${CMAKE_CURRENT_BINARY_DIR}/llvm-lit)
1237 set(LLVM_LIT_BASE_DIR "")
12351238 endif()
12361239
12371240 # Cache this so we don't have to do it again and have subsequent calls