3030
3131function at-exit {
3232 python3 " ${MONOREPO_ROOT} " /.ci/generate_test_report.py " :linux: Linux x64 Test Results" \
33- " linux-x64-test-results" " ${BUILD_DIR} " /test-results* .xml
33+ " linux-x64-test-results" " ${BUILD_DIR} " /test-results. * .xml
3434
3535 mkdir -p artifacts
3636 ccache --print-stats > artifacts/ccache_stats.txt
@@ -39,6 +39,7 @@ trap at-exit EXIT
3939
4040projects=" ${1} "
4141targets=" ${2} "
42+ llvm_lit_args=" -v --xunit-xml-output ${BUILD_DIR} /test-results.xml --timeout=1200 --time-tests"
4243
4344echo " --- cmake"
4445pip install -q -r " ${MONOREPO_ROOT} " /mlir/python/requirements.txt
@@ -51,13 +52,18 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
5152 -D LLVM_ENABLE_ASSERTIONS=ON \
5253 -D LLVM_BUILD_EXAMPLES=ON \
5354 -D COMPILER_RT_BUILD_LIBFUZZER=OFF \
54- -D LLVM_LIT_ARGS=" -v --xunit-xml-output ${BUILD_DIR} /test-results.xml --timeout=1200 --time-tests " \
55+ -D LLVM_LIT_ARGS=" $llvm_lit_args " \
5556 -D LLVM_ENABLE_LLD=ON \
5657 -D CMAKE_CXX_FLAGS=-gmlt \
5758 -D LLVM_CCACHE_BUILD=ON \
5859 -D MLIR_ENABLE_BINDINGS_PYTHON=ON \
5960 -D CMAKE_INSTALL_PREFIX=" ${INSTALL_DIR} "
6061
62+ # Configure installs llvm-lit into bin. Replace this with the wrapper script.
63+ # TODO: make a function for this
64+ mv " ${BUILD_DIR} " /bin/llvm-lit " ${BUILD_DIR} " /bin/llvm-lit-actual.py
65+ cp " ${MONOREPO_ROOT} " /.ci/lit-wrapper.py " ${BUILD_DIR} " /bin/llvm-lit
66+
6167echo " --- ninja"
6268# Targets are not escaped as they are passed as separate arguments.
6369ninja -C " ${BUILD_DIR} " -k 0 ${targets}
@@ -91,7 +97,11 @@ if [[ "${runtimes}" != "" ]]; then
9197 -D CMAKE_BUILD_TYPE=RelWithDebInfo \
9298 -D CMAKE_INSTALL_PREFIX=" ${INSTALL_DIR} " \
9399 -D LIBCXX_TEST_PARAMS=" std=c++03" \
94- -D LIBCXXABI_TEST_PARAMS=" std=c++03"
100+ -D LIBCXXABI_TEST_PARAMS=" std=c++03" \
101+ -D LLVM_LIT_ARGS=" $llvm_lit_args "
102+
103+ mv " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit-actual.py
104+ cp " ${MONOREPO_ROOT} " /.ci/lit-wrapper.py " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit
95105
96106 echo " --- ninja runtimes C++03"
97107
@@ -108,7 +118,11 @@ if [[ "${runtimes}" != "" ]]; then
108118 -D CMAKE_BUILD_TYPE=RelWithDebInfo \
109119 -D CMAKE_INSTALL_PREFIX=" ${INSTALL_DIR} " \
110120 -D LIBCXX_TEST_PARAMS=" std=c++26" \
111- -D LIBCXXABI_TEST_PARAMS=" std=c++26"
121+ -D LIBCXXABI_TEST_PARAMS=" std=c++26" \
122+ -D LLVM_LIT_ARGS=" $llvm_lit_args "
123+
124+ mv " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit-actual.py
125+ cp " ${MONOREPO_ROOT} " /.ci/lit-wrapper.py " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit
112126
113127 echo " --- ninja runtimes C++26"
114128
@@ -125,7 +139,11 @@ if [[ "${runtimes}" != "" ]]; then
125139 -D CMAKE_BUILD_TYPE=RelWithDebInfo \
126140 -D CMAKE_INSTALL_PREFIX=" ${INSTALL_DIR} " \
127141 -D LIBCXX_TEST_PARAMS=" enable_modules=clang" \
128- -D LIBCXXABI_TEST_PARAMS=" enable_modules=clang"
142+ -D LIBCXXABI_TEST_PARAMS=" enable_modules=clang" \
143+ -D LLVM_LIT_ARGS=" $llvm_lit_args "
144+
145+ mv " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit-actual.py
146+ cp " ${MONOREPO_ROOT} " /.ci/lit-wrapper.py " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit
129147
130148 echo " --- ninja runtimes clang modules"
131149
0 commit comments