[llvm-branch-commits] [lldb] [llvm] [ci] add dependencies for lldb python binding tests (PR #136158)

Matheus Izvekov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Apr 17 09:40:47 PDT 2025


https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/136158

Add correct configuration and dependencies for LLDB testing which is actually relevant for clang changes.

>From 20f393ed197d31619d169740afa4adae3393d26b Mon Sep 17 00:00:00 2001
From: Matheus Izvekov <mizvekov at gmail.com>
Date: Thu, 17 Apr 2025 13:31:32 -0300
Subject: [PATCH] [ci] add dependencies for lldb python binding tests

Add correct configuration and dependencies for LLDB testing which
is actually relevant for clang changes.
---
 .ci/monolithic-linux.sh    | 8 ++++++++
 lldb/test/requirements.txt | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh
index 59a6b22ccb06a..653495e45786a 100755
--- a/.ci/monolithic-linux.sh
+++ b/.ci/monolithic-linux.sh
@@ -54,6 +54,7 @@ targets="${2}"
 lit_args="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests"
 
 echo "--- cmake"
+
 export PIP_BREAK_SYSTEM_PACKAGES=1
 pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
 pip install -q -r "${MONOREPO_ROOT}"/lldb/test/requirements.txt
@@ -63,9 +64,13 @@ pip install -q -r "${MONOREPO_ROOT}"/.ci/requirements.txt
 export LLVM_SYMBOLIZER_PATH=`which llvm-symbolizer`
 [[ ! -f "${LLVM_SYMBOLIZER_PATH}" ]] && echo "llvm-symbolizer not found!"
 
+# Set up all runtimes either way. libcxx is a dependency of LLDB.
+# If it ends up being unused, not much harm.
 cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
       -D LLVM_ENABLE_PROJECTS="${projects}" \
+      -D LLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
       -G Ninja \
+      -D CMAKE_PREFIX_PATH="${HOME}/.local" \
       -D CMAKE_BUILD_TYPE=Release \
       -D LLVM_ENABLE_ASSERTIONS=ON \
       -D LLVM_BUILD_EXAMPLES=ON \
@@ -74,7 +79,10 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
       -D LLVM_ENABLE_LLD=ON \
       -D CMAKE_CXX_FLAGS=-gmlt \
       -D LLVM_CCACHE_BUILD=ON \
+      -D LIBCXX_CXX_ABI=libcxxabi \
       -D MLIR_ENABLE_BINDINGS_PYTHON=ON \
+      -D LLDB_ENABLE_PYTHON=ON \
+      -D LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
       -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
 
 echo "--- ninja"
diff --git a/lldb/test/requirements.txt b/lldb/test/requirements.txt
index 708f2327a6a04..c187180697d0b 100644
--- a/lldb/test/requirements.txt
+++ b/lldb/test/requirements.txt
@@ -5,3 +5,5 @@ psutil>=5.9.4
 # See llvm.org/pr22274.
 pexpect>=4.9.0; sys_platform != 'win32'
 packaging
+# Required for python tests
+swig



More information about the llvm-branch-commits mailing list