[Lldb-commits] [lldb] 1f0ded8 - [lldb][windows] recommend building with Python 3.11 (#191159)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 15 10:41:02 PDT 2026
Author: Charles Zablit
Date: 2026-04-15T18:40:58+01:00
New Revision: 1f0ded8b123789d8056e8429c92f3dad51935565
URL: https://github.com/llvm/llvm-project/commit/1f0ded8b123789d8056e8429c92f3dad51935565
DIFF: https://github.com/llvm/llvm-project/commit/1f0ded8b123789d8056e8429c92f3dad51935565.diff
LOG: [lldb][windows] recommend building with Python 3.11 (#191159)
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.
In the future, 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.
Added:
Modified:
lldb/cmake/modules/FindPythonAndSwig.cmake
lldb/docs/resources/build.rst
llvm/docs/ReleaseNotes.md
Removed:
################################################################################
diff --git a/lldb/cmake/modules/FindPythonAndSwig.cmake b/lldb/cmake/modules/FindPythonAndSwig.cmake
index b478038f144d9..764c6a4f3fd40 100644
--- a/lldb/cmake/modules/FindPythonAndSwig.cmake
+++ b/lldb/cmake/modules/FindPythonAndSwig.cmake
@@ -67,8 +67,10 @@ else()
LLDB_ENABLE_SWIG)
endif()
-set(LLDB_RECOMMENDED_PYTHON "3.8")
-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.")
-endif()
\ No newline at end of file
+if (WIN32)
+ set(LLDB_RECOMMENDED_PYTHON "3.11")
+ 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 24.")
+ endif()
+endif()
diff --git a/lldb/docs/resources/build.rst b/lldb/docs/resources/build.rst
index f231aac5732a7..567afdb969063 100644
--- a/lldb/docs/resources/build.rst
+++ b/lldb/docs/resources/build.rst
@@ -30,7 +30,7 @@ The following requirements are shared on all platforms.
If you want to run the test suite, you'll need to build LLDB with Python
scripting support.
-* `Python <http://www.python.org/>`_ 3.8 or later.
+* `Python <http://www.python.org/>`_ 3.8 or later (3.11 or later on Windows).
* `SWIG <http://swig.org/>`_ 4 or later.
If you are on FreeBSD or NetBSD, you will need to install ``gmake`` for building
@@ -62,7 +62,7 @@ CMake configuration error.
+-------------------+--------------------------------------------------------------+--------------------------+
| Libxml2 | XML | ``LLDB_ENABLE_LIBXML2`` |
+-------------------+--------------------------------------------------------------+--------------------------+
-| Python | Python scripting. >= 3.8 is required. | ``LLDB_ENABLE_PYTHON`` |
+| Python | Python scripting. 3.8 or later (3.11 or later on Windows). | ``LLDB_ENABLE_PYTHON`` |
+-------------------+--------------------------------------------------------------+--------------------------+
| Lua | Lua scripting. Lua 5.3 and 5.4 are supported. | ``LLDB_ENABLE_LUA`` |
+-------------------+--------------------------------------------------------------+--------------------------+
@@ -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 later.
+ 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
diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md
index 8ccd186e5207d..9caeef89d0b1c 100644
--- a/llvm/docs/ReleaseNotes.md
+++ b/llvm/docs/ReleaseNotes.md
@@ -298,6 +298,9 @@ Changes to LLDB
an affected version in a way that is compatible with these systems, the issue
contains details of backports that could be done to fix the affected versions.
+### Windows
+
+* Python 3.11 or later is now recommended for building LLDB 23 on Windows. From LLDB 24, Python 3.11 or later will be required.
Changes to BOLT
---------------
More information about the lldb-commits
mailing list