-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[lldb] Don't enable the Limited C API with Python 3.13 and SWIG 4.4.0 #169065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Don't automatically enable the Limited C API when we're using Python 3.13 and SWIG 4.4.0 due to a bug in SWIG. SWIG Issue: swig/swig#3283 SWIG PR: swig/swig#3285
Member
|
@llvm/pr-subscribers-lldb Author: Jonas Devlieghere (JDevlieghere) ChangesDon't automatically enable the Limited C API when we're using Python 3.13 and SWIG 4.4.0 due to a bug in SWIG. SWIG Issue: swig/swig#3283 Full diff: https://github.com/llvm/llvm-project/pull/169065.diff 1 Files Affected:
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index 89da2341839bc..f3240055316cd 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -182,16 +182,21 @@ if (LLDB_ENABLE_PYTHON)
# Enable targeting the Python Limited C API.
set(PYTHON_LIMITED_API_MIN_SWIG_VERSION "4.2")
+ set(AFFECTED_BY_SWIG_BUG SWIG_VERSION VERSION_EQUAL "4.4.0" AND Python3_VERSION VERSION_EQUAL "3.13")
if (SWIG_VERSION VERSION_GREATER_EQUAL PYTHON_LIMITED_API_MIN_SWIG_VERSION
- AND NOT LLDB_EMBED_PYTHON_HOME)
+ AND NOT LLDB_EMBED_PYTHON_HOME AND NOT AFFECTED_BY_SWIG_BUG)
set(default_enable_python_limited_api ON)
else()
set(default_enable_python_limited_api OFF)
endif()
+
option(LLDB_ENABLE_PYTHON_LIMITED_API "Force LLDB to only use the Python Limited API (requires SWIG 4.2 or later)"
${default_enable_python_limited_api})
# Diagnose unsupported configurations.
+ if (LLDB_ENABLE_PYTHON_LIMITED_API AND AFFECTED_BY_SWIG_BUG)
+ message(SEND_ERROR "LLDB_ENABLE_PYTHON_LIMITED_API is not compatible with SWIG 4.4.0 and Python 3.13 due to a bug in SWIG: https://github.com/swig/swig/issues/3283")
+ endif()
if (LLDB_ENABLE_PYTHON_LIMITED_API AND LLDB_EMBED_PYTHON_HOME)
message(SEND_ERROR "LLDB_ENABLE_PYTHON_LIMITED_API is not compatible with LLDB_EMBED_PYTHON_HOME")
endif()
|
felipepiovezan
approved these changes
Nov 21, 2025
da-viper
reviewed
Nov 21, 2025
swift-ci
pushed a commit
to swiftlang/llvm-project
that referenced
this pull request
Nov 21, 2025
…llvm#169065) Don't automatically enable the Limited C API when we're targeting Python 3.13 or later in combination with SWIG 4.4.0 due to a bug in the latter. SWIG Issue: swig/swig#3283 SWIG PR: swig/swig#3285 (cherry picked from commit 55d8b63)
aadeshps-mcw
pushed a commit
to aadeshps-mcw/llvm-project
that referenced
this pull request
Nov 26, 2025
…llvm#169065) Don't automatically enable the Limited C API when we're targeting Python 3.13 or later in combination with SWIG 4.4.0 due to a bug in the latter. SWIG Issue: swig/swig#3283 SWIG PR: swig/swig#3285
Priyanshu3820
pushed a commit
to Priyanshu3820/llvm-project
that referenced
this pull request
Nov 26, 2025
…llvm#169065) Don't automatically enable the Limited C API when we're targeting Python 3.13 or later in combination with SWIG 4.4.0 due to a bug in the latter. SWIG Issue: swig/swig#3283 SWIG PR: swig/swig#3285
augusto2112
pushed a commit
to augusto2112/llvm-project
that referenced
this pull request
Dec 3, 2025
…llvm#169065) Don't automatically enable the Limited C API when we're targeting Python 3.13 or later in combination with SWIG 4.4.0 due to a bug in the latter. SWIG Issue: swig/swig#3283 SWIG PR: swig/swig#3285
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.
Don't automatically enable the Limited C API when we're targeting Python 3.13 or later in combination with SWIG 4.4.0 due to a bug in the latter.
SWIG Issue: swig/swig#3283
SWIG PR: swig/swig#3285