================
@@ -238,11 +238,54 @@ add_lit_testsuite(check-clang "Running the Clang
regression tests"
ARGS ${CLANG_TEST_EXTRA_ARGS}
)
+# Skip CIR here. check-clang above still runs these tests. The check-clang-cir
+# target is created explicitly below so that it (and its subdirectory-based
+# sub-targets) depend only on the tools those tests invoke and the tools
+# required to load clang/test/lit.cfg.py.
add_lit_testsuites(CLANG ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${CLANG_TEST_DEPS}
FOLDER "Clang tests/Suites"
+ SKIP "^CIR"
)
+# These tools are resolved while loading clang/test/lit.cfg.py, or invoked
+# directly by tests under clang/test/CIR.
+set(CLANG_CIR_TEST_DEPS
+ clang
+ )
+if(CLANG_ENABLE_CIR)
+ list(APPEND CLANG_CIR_TEST_DEPS
+ cir-opt
+ cir-translate
+ )
+endif()
+if(NOT CLANG_BUILT_STANDALONE)
+ list(APPEND CLANG_CIR_TEST_DEPS
+ FileCheck
+ count
+ llvm-config
+ llvm-dis
+ llvm-objdump
+ not
+ opt
+ split-file
+ )
+endif()
+
+# add_lit_testsuites creates no targets when LLVM_ENABLE_IDE is on.
+if(NOT LLVM_ENABLE_IDE)
----------------
joker-eph wrote:
Not sure why we need a guard here? The `add_lit_testsuites` for `check-clang`
above isn't guarded
https://github.com/llvm/llvm-project/pull/227957
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits