Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 7a80113

Browse files
committed
[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
1 parent 45503fc commit 7a80113

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

runtimes/CMakeLists.txt

+8-7
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,14 @@ foreach(entry ${runtimes})
152152
set(HAVE_${canon_name} ON)
153153
endforeach()
154154

155+
if(LLVM_INCLUDE_TESTS)
156+
set(LIT_ARGS_DEFAULT "-sv --show-xfail --show-unsupported")
157+
if (MSVC OR XCODE)
158+
set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
159+
endif()
160+
set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit")
161+
endif()
162+
155163
# We do this in two loops so that HAVE_* is set for each runtime before the
156164
# other runtimes are added.
157165
foreach(entry ${runtimes})
@@ -179,13 +187,6 @@ endforeach()
179187
if(LLVM_INCLUDE_TESTS)
180188
# Add a global check rule now that all subdirectories have been traversed
181189
# and we know the total set of lit testsuites.
182-
183-
set(LIT_ARGS_DEFAULT "-sv --show-xfail --show-unsupported")
184-
if (MSVC OR XCODE)
185-
set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
186-
endif()
187-
set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit")
188-
189190
add_lit_target(check-runtimes
190191
"Running all regression tests"
191192
${RUNTIMES_LIT_TESTSUITES}

0 commit comments

Comments
 (0)