Skip to content

Commit c681149

Browse files
authored
Revert "[lldb] Use the Python limited API with SWIG 4.2 or later" (#153327)
Reverts #153119 because with `LLDB_USE_LIBEDIT_READLINE_COMPAT_MODULE`, we're using `PyImport_Inittab` which isn't part of the stable API.
1 parent 350f6ab commit c681149

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lldb/cmake/modules/LLDBConfig.cmake

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ add_optional_dependency(LLDB_ENABLE_FBSDVMCORE "Enable libfbsdvmcore support in
6868
option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" ON)
6969
option(LLDB_BUILD_FRAMEWORK "Build LLDB.framework (Darwin only)" OFF)
7070
option(LLDB_ENABLE_PROTOCOL_SERVERS "Enable protocol servers (e.g. MCP) in LLDB" ON)
71+
option(LLDB_ENABLE_PYTHON_LIMITED_API "Force LLDB to only use the Python Limited API (requires SWIG 4.2 or later)" OFF)
7172
option(LLDB_NO_INSTALL_DEFAULT_RPATH "Disable default RPATH settings in binaries" OFF)
7273
option(LLDB_USE_SYSTEM_DEBUGSERVER "Use the system's debugserver for testing (Darwin only)." OFF)
7374
option(LLDB_SKIP_STRIP "Whether to skip stripping of binaries when installing lldb." OFF)
@@ -172,14 +173,6 @@ if (LLDB_ENABLE_PYTHON)
172173
"Embed PYTHONHOME in the binary. If set to OFF, PYTHONHOME environment variable will be used to to locate Python."
173174
${default_embed_python_home})
174175

175-
if (SWIG_VERSION VERSION_GREATER_EQUAL "4.2")
176-
set(default_enable_python_limited_api ON)
177-
else()
178-
set(default_enable_python_limited_api OFF)
179-
endif()
180-
option(LLDB_ENABLE_PYTHON_LIMITED_API "Force LLDB to only use the Python Limited API (requires SWIG 4.2 or later)"
181-
${default_enable_python_limited_api})
182-
183176
include_directories(${Python3_INCLUDE_DIRS})
184177
if (LLDB_EMBED_PYTHON_HOME)
185178
get_filename_component(PYTHON_HOME "${Python3_EXECUTABLE}" DIRECTORY)

0 commit comments

Comments
 (0)