[Lldb-commits] [lldb] 8520b0f - [lldb/swig] Remove deprecated flags for generating bindings
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 30 14:07:58 PST 2023
Author: Med Ismail Bennani
Date: 2023-01-30T14:07:32-08:00
New Revision: 8520b0fc59c010675afbfdae71d48893afc7b68b
URL: https://github.com/llvm/llvm-project/commit/8520b0fc59c010675afbfdae71d48893afc7b68b
DIFF: https://github.com/llvm/llvm-project/commit/8520b0fc59c010675afbfdae71d48893afc7b68b.diff
LOG: [lldb/swig] Remove deprecated flags for generating bindings
This patch conditionaly removes the `-py3` swig flag that was used to
generate python3 bindings, since it's unsued since SWIG 4.1.0.
```
Deprecated command line option: -py3. Ignored, this option is no longer supported
```
This also removes the `-shadow` flag that have been deprecated since 2002.
Differential Revision: https://reviews.llvm.org/D142245
Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>
Added:
Modified:
lldb/bindings/python/CMakeLists.txt
Removed:
################################################################################
diff --git a/lldb/bindings/python/CMakeLists.txt b/lldb/bindings/python/CMakeLists.txt
index c631faf52ac34..528f9f47f17a8 100644
--- a/lldb/bindings/python/CMakeLists.txt
+++ b/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 @@ add_custom_command(
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
More information about the lldb-commits
mailing list