[Lldb-commits] [lldb] 7d23c4b - [LLDB] Use `-fastproxy` when building swig bridge without limited python API (Reland) (#236247)

via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 29 20:01:24 PDT 2026


Author: Raphael Isemann
Date: 2026-10-29T20:01:20-07:00
New Revision: 7d23c4bde3a05469cc531d9f6042941a0e0f856a

URL: https://github.com/llvm/llvm-project/commit/7d23c4bde3a05469cc531d9f6042941a0e0f856a
DIFF: https://github.com/llvm/llvm-project/commit/7d23c4bde3a05469cc531d9f6042941a0e0f856a.diff

LOG: [LLDB] Use `-fastproxy` when building swig bridge without limited python API (Reland) (#236247)

Per [swig
docs](https://www.swig.org/Doc4.4/Python.html#Python_fastproxy).
Additionally, the `-olddefs` option is included so that the doc comments
still function. The latter change makes importing the LLDB module a bit
slower, but makes every method call a good bit faster.

Depends on: #235909

Co-authored-by: Walnut <walnut356dev at gmail.com>
Co-authored-by: Jonas Devlieghere <jonas at devlieghere.com>

Added: 
    

Modified: 
    lldb/bindings/python/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/bindings/python/CMakeLists.txt b/lldb/bindings/python/CMakeLists.txt
index 77b89020919236..6ffe73189c204f 100644
--- a/lldb/bindings/python/CMakeLists.txt
+++ b/lldb/bindings/python/CMakeLists.txt
@@ -5,6 +5,10 @@ if ("${SWIG_VERSION}" VERSION_LESS "4.1.0")
   message(STATUS "SWIG version ${SWIG_VERSION} uses `-py3` flag.")
 endif()
 
+if (NOT LLDB_ENABLE_PYTHON_LIMITED_API)
+    set(SWIG_EXTRA_FLAGS ${SWIG_EXTRA_FLAGS} -fastproxy -olddefs)
+endif()
+
 add_custom_command(
   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lldb.py


        


More information about the lldb-commits mailing list