diff options
| author | Med Ismail Bennani <medismail.bennani@gmail.com> | 2023-01-30 14:07:32 -0800 |
|---|---|---|
| committer | Med Ismail Bennani <medismail.bennani@gmail.com> | 2023-01-30 14:07:32 -0800 |
| commit | 8520b0fc59c010675afbfdae71d48893afc7b68b (patch) | |
| tree | 74709c28cfd1ae129f7a34e2c14fe2838273e9a7 /lldb/bindings/python | |
| parent | d502e0fbf933d08df2daf1618e97589af9e3c7d9 (diff) | |
| download | llvm-8520b0fc59c010675afbfdae71d48893afc7b68b.tar.gz llvm-8520b0fc59c010675afbfdae71d48893afc7b68b.tar.bz2 llvm-8520b0fc59c010675afbfdae71d48893afc7b68b.zip | |
[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@gmail.com>
Diffstat (limited to 'lldb/bindings/python')
| -rw-r--r-- | lldb/bindings/python/CMakeLists.txt | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lldb/bindings/python/CMakeLists.txt b/lldb/bindings/python/CMakeLists.txt index c631faf52ac3..528f9f47f17a 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 |
