[libc++][ci] Enable modules in the Runtimes build

The runtimes build has assertions enabled, which is necessary to catch
some of the modules-related issues we've been seeing recently. This
patch enables testing with modules in the runtimes build so as to cover
those cases.

In the future, a better solution would be to systematically use versions
of Clang that have assertions enabled. However, the Clangs we release
currently don't have assertions enabled by default, which causes a
challenge for the CI (we could try to build our own Clang from ToT with
assertions in the CI, but that poses some problems).

Differential Revision: https://reviews.llvm.org/D104252
This commit is contained in:
Louis Dionne 2021-06-14 14:36:13 -04:00
parent 928394d109
commit 1b87573aaf
1 changed files with 6 additions and 1 deletions

View File

@ -449,6 +449,10 @@ runtimes-build)
clean
echo "--- Generating CMake"
# TODO: We currently enable modules and assertions in the runtimes build
# because that provides coverage for some specific Clang failures
# we've been seeing recently, however it would be better to instead
# run all CI configurations against a Clang that has assertions enabled.
${CMAKE} \
-S "${MONOREPO_ROOT}/llvm" \
-B "${BUILD_DIR}" \
@ -458,7 +462,8 @@ runtimes-build)
-DLLVM_ENABLE_PROJECTS="clang" \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \
-DLLVM_RUNTIME_TARGETS="x86_64-unknown-linux-gnu" \
-DLLVM_ENABLE_ASSERTIONS=ON
-DLLVM_ENABLE_ASSERTIONS=ON \
-C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-modules.cmake"
echo "+++ Running the libc++ and libc++abi tests"
${NINJA} -C "${BUILD_DIR}" check-runtimes