|
| 1 | +# Custom `check-3c` target that depends only on the tools used by the 3C |
| 2 | +# regression tests, unlike `check-clang-3c`, which depends on all of |
| 3 | +# CLANG_TEST_DEPS. This may significantly speed up the build. |
| 4 | + |
| 5 | +# If you want to run `lit` yourself, you can use `check-3c-deps` to build the |
| 6 | +# dependencies of the test suite without running it. |
| 7 | +add_custom_target(check-3c-deps |
| 8 | + DEPENDS |
| 9 | + # Tools actually used by our RUN lines. |
| 10 | + 3c |
| 11 | + clang |
| 12 | + FileCheck |
| 13 | + # llvm_config.use_default_substitutions() in ../lit.cfg.py refuses to run if |
| 14 | + # these do not exist. |
| 15 | + count |
| 16 | + not |
| 17 | + # llvm_config.feature_config(...) in ../lit.cfg.py directly runs llvm-config |
| 18 | + # to gather some information. |
| 19 | + llvm-config |
| 20 | + ) |
| 21 | + |
| 22 | +# The llvm_config.add_tool_substitutions(...) call in ../lit.cfg.py looks for |
| 23 | +# some additional tools and warns if they don't exist. Currently, we allow these |
| 24 | +# warnings to be printed. If the warnings bother us, we could build the tools; |
| 25 | +# they account for a small fraction of the difference between check-3c-deps and |
| 26 | +# CLANG_TEST_DEPS. |
| 27 | +# |
| 28 | +# Note that lit.local.cfg runs after ../lit.cfg.py and thus cannot remove any of |
| 29 | +# the tool dependencies. We might be able to overcome that by defining our own |
| 30 | +# lit.cfg.py, but that doesn't seem worthwhile since it risks making the |
| 31 | +# configuration of the 3C tests diverge more seriously from that of the other |
| 32 | +# Clang tests, even when the 3C tests are run via check-clang-3c or the like. |
| 33 | + |
| 34 | +add_lit_testsuite(check-3c "Running the 3C regression tests" |
| 35 | + ${CMAKE_CURRENT_BINARY_DIR} |
| 36 | + PARAMS ${CLANG_TEST_PARAMS} |
| 37 | + DEPENDS check-3c-deps |
| 38 | + ARGS ${CLANG_TEST_EXTRA_ARGS} |
| 39 | + ) |
0 commit comments