[Lldb-commits] [lldb] [lldb][windows] recommend building with Python 3.11 (PR #191159)

via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 9 03:48:43 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

<details>
<summary>Changes</summary>

As of https://github.com/llvm/llvm-project/pull/176387 and release 22, official builds of lldb on Windows use Python 3.11 both on x64 and arm64.

The Windows lldb build bots use 3.11+ versions of Python:

[lldb-x86_64-win](https://lab.llvm.org/buildbot/#/builders/211) - `3.12.7`
[lldb-remote-linux-win](https://lab.llvm.org/buildbot/#/builders/197) - `3.12.7`
[lldb-aarch64-windows](https://lab.llvm.org/buildbot/#/builders/141) - `3.11.9`

This patch changes the cmake config and documentation to recommend building lldb on Windows with Python 3.11 or more recent.

Given the reduced number of lldb maintainers on Windows compared to other platforms, bumping the Python version on Windows would help reduce the surface area of Python related bugs.

---
Full diff: https://github.com/llvm/llvm-project/pull/191159.diff


2 Files Affected:

- (modified) lldb/cmake/modules/FindPythonAndSwig.cmake (+4-1) 
- (modified) lldb/docs/resources/build.rst (+3-3) 


``````````diff
diff --git a/lldb/cmake/modules/FindPythonAndSwig.cmake b/lldb/cmake/modules/FindPythonAndSwig.cmake
index b478038f144d9..e77615cba9017 100644
--- a/lldb/cmake/modules/FindPythonAndSwig.cmake
+++ b/lldb/cmake/modules/FindPythonAndSwig.cmake
@@ -66,8 +66,11 @@ else()
                                       Python3_EXECUTABLE
                                       LLDB_ENABLE_SWIG)
 endif()
-
+if(WIN32)
+set(LLDB_RECOMMENDED_PYTHON "3.11")
+else()
 set(LLDB_RECOMMENDED_PYTHON "3.8")
+endif()
 if(PYTHONANDSWIG_FOUND AND "${Python3_VERSION}" VERSION_LESS "${LLDB_RECOMMENDED_PYTHON}")
   message(WARNING "Using Python ${Python3_VERSION}. ${LLDB_RECOMMENDED_PYTHON} "
                   "is recommended and will be required from LLDB 21.")
diff --git a/lldb/docs/resources/build.rst b/lldb/docs/resources/build.rst
index f231aac5732a7..ca2937efd9d91 100644
--- a/lldb/docs/resources/build.rst
+++ b/lldb/docs/resources/build.rst
@@ -112,9 +112,9 @@ Please follow the steps below if you only want to **build** lldb.
    ``dirname`` are available from your terminal.
 3. Install `make <https://sourceforge.net/projects/ezwinports/files/>`_ and
    verify that it's in your ``PATH``.
-4. Install `Python 3 <https://www.python.org/downloads/windows/>`_. Either using
-   the "Windows Installer" or "Python Install Manager". Make sure ``python`` is
-   added to your ``PATH``.
+4. Install `Python 3.11 <https://www.python.org/downloads/windows/>`_ or newer.
+   Either using the "Windows Installer" or "Python Install Manager". Make sure
+   ``python`` is added to your ``PATH``.
 
    .. note::
       Building LLDB in debug mode requires a debug version of Python (because

``````````

</details>


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


More information about the lldb-commits mailing list