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,17 @@ 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+ mv " ${BUILD_DIR} " /bin/llvm-lit " ${BUILD_DIR} " /bin/llvm-lit-actual
64+ cp " ${MONOREPO_ROOT} " /.ci/lit-wrapper.py " ${BUILD_DIR} " /bin/llvm-lit
65+
6166echo " --- ninja"
6267# Targets are not escaped as they are passed as separate arguments.
6368ninja -C " ${BUILD_DIR} " -k 0 ${targets}
@@ -91,7 +96,11 @@ if [[ "${runtimes}" != "" ]]; then
9196 -D CMAKE_BUILD_TYPE=RelWithDebInfo \
9297 -D CMAKE_INSTALL_PREFIX=" ${INSTALL_DIR} " \
9398 -D LIBCXX_TEST_PARAMS=" std=c++03" \
94- -D LIBCXXABI_TEST_PARAMS=" std=c++03"
99+ -D LIBCXXABI_TEST_PARAMS=" std=c++03" \
100+ -D LLVM_LIT_ARGS=" $llvm_lit_args "
101+
102+ mv " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit " ${BUILD_DIR} " /bin/llvm-lit-actual
103+ cp " ${MONOREPO_ROOT} " /.ci/lit-wrapper.py " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit
95104
96105 echo " --- ninja runtimes C++03"
97106
@@ -108,7 +117,11 @@ if [[ "${runtimes}" != "" ]]; then
108117 -D CMAKE_BUILD_TYPE=RelWithDebInfo \
109118 -D CMAKE_INSTALL_PREFIX=" ${INSTALL_DIR} " \
110119 -D LIBCXX_TEST_PARAMS=" std=c++26" \
111- -D LIBCXXABI_TEST_PARAMS=" std=c++26"
120+ -D LIBCXXABI_TEST_PARAMS=" std=c++26" \
121+ -D LLVM_LIT_ARGS=" $llvm_lit_args "
122+
123+ mv " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit " ${BUILD_DIR} " /bin/llvm-lit-actual.py
124+ cp " ${MONOREPO_ROOT} " /.ci/lit-wrapper.py " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit
112125
113126 echo " --- ninja runtimes C++26"
114127
@@ -125,7 +138,11 @@ if [[ "${runtimes}" != "" ]]; then
125138 -D CMAKE_BUILD_TYPE=RelWithDebInfo \
126139 -D CMAKE_INSTALL_PREFIX=" ${INSTALL_DIR} " \
127140 -D LIBCXX_TEST_PARAMS=" enable_modules=clang" \
128- -D LIBCXXABI_TEST_PARAMS=" enable_modules=clang"
141+ -D LIBCXXABI_TEST_PARAMS=" enable_modules=clang" \
142+ -D LLVM_LIT_ARGS=" $llvm_lit_args "
143+
144+ mv " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit " ${BUILD_DIR} " /bin/llvm-lit-actual.py
145+ cp " ${MONOREPO_ROOT} " /.ci/lit-wrapper.py " ${RUNTIMES_BUILD_DIR} " /bin/llvm-lit
129146
130147 echo " --- ninja runtimes clang modules"
131148
0 commit comments