[runtimes] Make sure LLVM_LIT_ARGS is set before including individual runtimes

Otherwise, the individual `check-cxx`, `check-cxxabi` and similar targets
will not know about `LLVM_LIT_ARGS`, and we'll end up running lit without
any argument.

Differential Revision: https://reviews.llvm.org/D112035
This commit is contained in:
Louis Dionne 2021-10-18 17:54:05 -04:00
parent 45503fc044
commit 7a801138f8
1 changed files with 8 additions and 7 deletions

View File

@ -152,6 +152,14 @@ foreach(entry ${runtimes})
set(HAVE_${canon_name} ON)
endforeach()
if(LLVM_INCLUDE_TESTS)
set(LIT_ARGS_DEFAULT "-sv --show-xfail --show-unsupported")
if (MSVC OR XCODE)
set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
endif()
set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit")
endif()
# We do this in two loops so that HAVE_* is set for each runtime before the
# other runtimes are added.
foreach(entry ${runtimes})
@ -179,13 +187,6 @@ endforeach()
if(LLVM_INCLUDE_TESTS)
# Add a global check rule now that all subdirectories have been traversed
# and we know the total set of lit testsuites.
set(LIT_ARGS_DEFAULT "-sv --show-xfail --show-unsupported")
if (MSVC OR XCODE)
set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
endif()
set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit")
add_lit_target(check-runtimes
"Running all regression tests"
${RUNTIMES_LIT_TESTSUITES}