From 7a801138f8bddf17d7df52c1c3f1d4ce8da702ad Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 18 Oct 2021 17:54:05 -0400 Subject: [PATCH] [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 --- runtimes/CMakeLists.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index 2cc8eab3e73d..8a3c683900b1 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -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}