[Lldb-commits] [PATCH] D142245: [lldb/swig] Remove deprecated flags for generating bindings

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 30 14:08:06 PST 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG8520b0fc59c0: [lldb/swig] Remove deprecated flags for generating bindings (authored by mib).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142245/new/

https://reviews.llvm.org/D142245

Files:
  lldb/bindings/python/CMakeLists.txt


Index: lldb/bindings/python/CMakeLists.txt
===================================================================
--- lldb/bindings/python/CMakeLists.txt
+++ lldb/bindings/python/CMakeLists.txt
@@ -1,3 +1,10 @@
+set(SWIG_EXTRA_FLAGS -c++ -threads -python)
+
+if ("${SWIG_VERSION}" VERSION_LESS "4.1.0")
+  set(SWIG_EXTRA_FLAGS ${SWIG_EXTRA_FLAGS} -py3)
+  message(STATUS "SWIG version ${SWIG_VERSION} uses `-py3` flag.")
+endif()
+
 add_custom_command(
   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lldb.py
@@ -7,11 +14,7 @@
   COMMAND ${SWIG_EXECUTABLE}
       ${SWIG_COMMON_FLAGS}
       -I${CMAKE_CURRENT_SOURCE_DIR}
-      -c++
-      -shadow
-      -python
-      -py3
-      -threads
+      ${SWIG_EXTRA_FLAGS}
       -outdir ${CMAKE_CURRENT_BINARY_DIR}
       -o ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
       ${CMAKE_CURRENT_SOURCE_DIR}/python.swig


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142245.493418.patch
Type: text/x-patch
Size: 910 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230130/4c01bf4f/attachment.bin>


More information about the lldb-commits mailing list