[lldb] Recommend Python 3.8 as the minimum Python version for LLDB#114807
Merged
DavidSpickett merged 2 commits intollvm:mainfrom Nov 12, 2024
Merged
[lldb] Recommend Python 3.8 as the minimum Python version for LLDB#114807DavidSpickett merged 2 commits intollvm:mainfrom
DavidSpickett merged 2 commits intollvm:mainfrom
Conversation
Member
|
@llvm/pr-subscribers-lldb Author: David Spickett (DavidSpickett) ChangesSee https://discourse.llvm.org/t/rfc-lets-document-and-enforce-a-minimum-python-version-for-lldb/82731 for discussions. This matches LLVM's requirement to run tests. For LLDB 20 there will be a CMake warning telling builders that from LLDB 21 this will be a hard requirement. From LLDB 21, it will be an error to try to build with anything <= 3.8. So there are no code changes in this commit. Once the llvm 20 branch is created we can remove some < 3.8 support code. As always, if you disable Python support you will not get any new warnings or errors from this change. Full diff: https://github.com/llvm/llvm-project/pull/114807.diff 2 Files Affected:
diff --git a/lldb/cmake/modules/FindPythonAndSwig.cmake b/lldb/cmake/modules/FindPythonAndSwig.cmake
index d62cced0d095e9..2cdd2204ae43cc 100644
--- a/lldb/cmake/modules/FindPythonAndSwig.cmake
+++ b/lldb/cmake/modules/FindPythonAndSwig.cmake
@@ -64,3 +64,10 @@ else()
Python3_EXECUTABLE
LLDB_ENABLE_SWIG)
endif()
+
+set(LLDB_RECOMMENDED_PYTHON "3.8")
+if(Python3_LIBRARIES AND Python3_INCLUDE_DIRS AND Python3_EXECUTABLE AND LLDB_ENABLE_SWIG
+ 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
diff --git a/lldb/docs/resources/build.rst b/lldb/docs/resources/build.rst
index 33b6a6f79def4b..0ff0a0d7d049e1 100644
--- a/lldb/docs/resources/build.rst
+++ b/lldb/docs/resources/build.rst
@@ -51,21 +51,21 @@ CMake flag to ``On`` or ``Off`` to force the dependency to be enabled or
disabled. When a dependency is set to ``On`` and can't be found it will cause a
CMake configuration error.
-+-------------------+------------------------------------------------------+--------------------------+
-| Feature | Description | CMake Flag |
-+===================+======================================================+==========================+
-| Editline | Generic line editing, history, Emacs and Vi bindings | ``LLDB_ENABLE_LIBEDIT`` |
-+-------------------+------------------------------------------------------+--------------------------+
-| Curses | Text user interface | ``LLDB_ENABLE_CURSES`` |
-+-------------------+------------------------------------------------------+--------------------------+
-| LZMA | Lossless data compression | ``LLDB_ENABLE_LZMA`` |
-+-------------------+------------------------------------------------------+--------------------------+
-| Libxml2 | XML | ``LLDB_ENABLE_LIBXML2`` |
-+-------------------+------------------------------------------------------+--------------------------+
-| Python | Python scripting | ``LLDB_ENABLE_PYTHON`` |
-+-------------------+------------------------------------------------------+--------------------------+
-| Lua | Lua scripting | ``LLDB_ENABLE_LUA`` |
-+-------------------+------------------------------------------------------+--------------------------+
++-------------------+--------------------------------------------------------------+--------------------------+
+| Feature | Description | CMake Flag |
++===================+==============================================================+==========================+
+| Editline | Generic line editing, history, Emacs and Vi bindings | ``LLDB_ENABLE_LIBEDIT`` |
++-------------------+--------------------------------------------------------------+--------------------------+
+| Curses | Text user interface | ``LLDB_ENABLE_CURSES`` |
++-------------------+--------------------------------------------------------------+--------------------------+
+| LZMA | Lossless data compression | ``LLDB_ENABLE_LZMA`` |
++-------------------+--------------------------------------------------------------+--------------------------+
+| Libxml2 | XML | ``LLDB_ENABLE_LIBXML2`` |
++-------------------+--------------------------------------------------------------+--------------------------+
+| Python | Python scripting. >= 3.0 is required, >= 3.8 is recommended. | ``LLDB_ENABLE_PYTHON`` |
++-------------------+--------------------------------------------------------------+--------------------------+
+| Lua | Lua scripting | ``LLDB_ENABLE_LUA`` |
++-------------------+--------------------------------------------------------------+--------------------------+
Depending on your platform and package manager, one might run any of the
commands below.
@@ -75,7 +75,7 @@ commands below.
$ yum install libedit-devel libxml2-devel ncurses-devel python-devel swig
$ sudo apt-get install build-essential swig python3-dev libedit-dev libncurses5-dev libxml2-dev
$ pkg install swig python libxml2
- $ pkgin install swig python36 cmake ninja-build
+ $ pkgin install swig python38 cmake ninja-build
$ brew install swig cmake ninja
.. note::
|
JDevlieghere
reviewed
Nov 4, 2024
JDevlieghere
approved these changes
Nov 4, 2024
See https://discourse.llvm.org/t/rfc-lets-document-and-enforce-a-minimum-python-version-for-lldb/82731 for discussions. This matches LLVM's requirement to run tests. For LLDB 20 there will be a CMake warning telling builders that from LLDB 21 this will be a hard requirement. From LLDB 21, it will be an error to try to build with anything <= 3.8. So there are no code changes in this commit. Once the llvm 20 branch is created we can remove some < 3.8 support code. As always, if you disable Python support you will not get any new warnings or errors from this change.
3c035a4 to
fa8b8ab
Compare
Groverkss
pushed a commit
to iree-org/llvm-project
that referenced
this pull request
Nov 15, 2024
…lvm#114807) See https://discourse.llvm.org/t/rfc-lets-document-and-enforce-a-minimum-python-version-for-lldb/82731 for discussions. This matches LLVM's requirement to run tests. For LLDB 20 there will be a CMake warning telling builders that from LLDB 21 this will be a hard requirement. From LLDB 21, it will be an error to try to build with anything <= 3.8. So there are no code changes in this commit. Once the llvm 20 branch is created we can remove some < 3.8 support code. As always, if you disable Python support you will not get any new warnings or errors from this change.
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Dec 31, 2024
Use python built in type annotations in LLDB visualizer scripts Replaces type annotation comments with python's built-in type annotations. Built-in type annotations were added in python 3.5. LLDB [currently recommends (and as of LLVM 21, will enforce)](llvm/llvm-project#114807) a minimum python version of 3.8. Rust's test suite also requires python 3.10.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 31, 2024
Rollup merge of rust-lang#134291 - Walnut356:type_annots, r=tgross35 Use python built in type annotations in LLDB visualizer scripts Replaces type annotation comments with python's built-in type annotations. Built-in type annotations were added in python 3.5. LLDB [currently recommends (and as of LLVM 21, will enforce)](llvm/llvm-project#114807) a minimum python version of 3.8. Rust's test suite also requires python 3.10.
DavidSpickett
added a commit
that referenced
this pull request
Jan 13, 2025
github-actions bot
pushed a commit
to arm/arm-toolchain
that referenced
this pull request
Jan 13, 2025
kazutakahirata
pushed a commit
to kazutakahirata/llvm-project
that referenced
this pull request
Jan 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See https://discourse.llvm.org/t/rfc-lets-document-and-enforce-a-minimum-python-version-for-lldb/82731 for discussions.
This matches LLVM's requirement to run tests. For LLDB 20 there will be a CMake warning telling builders that from LLDB 21 this will be a hard requirement. From LLDB 21, it will be an error to try to build with anything <= 3.8.
So there are no code changes in this commit. Once the llvm 20 branch is created we can remove some < 3.8 support code.
As always, if you disable Python support you will not get any new warnings or errors from this change.