[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

Louis Dionne via llvm-commits llvm-commits at lists.llvm.org
Fri May 24 13:43:37 PDT 2024


================
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
 echo "--- ninja"
 # Targets are not escaped as they are passed as separate arguments.
 ninja -C "${BUILD_DIR}" -k 0 ${targets}
+
+runtimes="${3}"
+runtime_targets="${4}"
+
+# Compiling runtimes with just-built Clang and running their tests
+# as an additional testing for Clang.
+if [[ "${runtimes}" != "" ]]; then
+  if [[ "${runtime_targets}" == "" ]]; then
+    echo "Runtimes to build are specified, but targets are not."
+  fi
+
+  RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes"
+  INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install"
+  mkdir -p ${RUNTIMES_BUILD_DIR}
+
+  echo "--- cmake runtimes C++03"
+
+  cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
+      -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \
+      -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \
+      -DLLVM_ENABLE_RUNTIMES="${runtimes}" \
+      -DLIBCXX_CXX_ABI=libcxxabi \
+      -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+      -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
+      -DLIBCXX_TEST_PARAMS="std=c++03" \
+      -DLIBCXXABI_TEST_PARAMS="std=c++03"
----------------
ldionne wrote:

```suggestion
      -D LIBCXX_CXX_ABI=libcxxabi \
      -D CMAKE_BUILD_TYPE=RelWithDebInfo \
      -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
      -D LIBCXX_TEST_PARAMS="std=c++03" \
      -D LIBCXXABI_TEST_PARAMS="std=c++03"
```

etc.. for consistency with above.

https://github.com/llvm/llvm-project/pull/93318


More information about the llvm-commits mailing list