Use the Python limited API when building with SWIG 4.2 or later.
This commit is contained in:
parent
8a0c7e9b32
commit
52c9489d1d
@ -68,7 +68,6 @@ add_optional_dependency(LLDB_ENABLE_FBSDVMCORE "Enable libfbsdvmcore support in
|
||||
option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" ON)
|
||||
option(LLDB_BUILD_FRAMEWORK "Build LLDB.framework (Darwin only)" OFF)
|
||||
option(LLDB_ENABLE_PROTOCOL_SERVERS "Enable protocol servers (e.g. MCP) in LLDB" ON)
|
||||
option(LLDB_ENABLE_PYTHON_LIMITED_API "Force LLDB to only use the Python Limited API (requires SWIG 4.2 or later)" OFF)
|
||||
option(LLDB_NO_INSTALL_DEFAULT_RPATH "Disable default RPATH settings in binaries" OFF)
|
||||
option(LLDB_USE_SYSTEM_DEBUGSERVER "Use the system's debugserver for testing (Darwin only)." OFF)
|
||||
option(LLDB_SKIP_STRIP "Whether to skip stripping of binaries when installing lldb." OFF)
|
||||
@ -174,11 +173,20 @@ if (LLDB_ENABLE_PYTHON)
|
||||
${default_embed_python_home})
|
||||
|
||||
include_directories(${Python3_INCLUDE_DIRS})
|
||||
|
||||
if (LLDB_EMBED_PYTHON_HOME)
|
||||
get_filename_component(PYTHON_HOME "${Python3_EXECUTABLE}" DIRECTORY)
|
||||
set(LLDB_PYTHON_HOME "${PYTHON_HOME}" CACHE STRING
|
||||
"Path to use as PYTHONHOME in lldb. If a relative path is specified, it will be resolved at runtime relative to liblldb directory.")
|
||||
endif()
|
||||
|
||||
if (SWIG_VERSION VERSION_GREATER_EQUAL "4.2" AND NOT LLDB_EMBED_PYTHON_HOME)
|
||||
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})
|
||||
endif()
|
||||
|
||||
if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)
|
||||
|
Loading…
x
Reference in New Issue
Block a user