mattd created this revision.
mattd added reviewers: aadsm, hhb.
mattd added a project: LLDB.
Herald added a subscriber: mgorny.
If the SWIG dependency is required {LLDB_ENABLE_PYTHON, LLDB_ENABLE_LUA}
and SWIG is not available, fail the configuration step. Terminate the
configure early rather than later with a clear error message.
We could possibly modify:
`llvm-project/lldb/cmake/modules/FindPythonInterpAndLibs.cmake`
However, the patch here seems clear in my opinion.
https://reviews.llvm.org/D74917
Files:
lldb/bindings/CMakeLists.txt
Index: lldb/bindings/CMakeLists.txt
===================================================================
--- lldb/bindings/CMakeLists.txt
+++ lldb/bindings/CMakeLists.txt
@@ -33,6 +33,10 @@
)
if (LLDB_ENABLE_PYTHON)
+ if (NOT SWIG_FOUND)
+ message(FATAL_ERROR
+ "The SWIG package is required for Python support in LLDB.")
+ endif()
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lldb.py
@@ -57,6 +61,10 @@
endif()
if (LLDB_ENABLE_LUA)
+ if (NOT SWIG_FOUND)
+ message(FATAL_ERROR
+ "The SWIG package is required for LUA support in LLDB.")
+ endif()
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapLua.cpp
DEPENDS ${SWIG_SOURCES}
Index: lldb/bindings/CMakeLists.txt
===================================================================
--- lldb/bindings/CMakeLists.txt
+++ lldb/bindings/CMakeLists.txt
@@ -33,6 +33,10 @@
)
if (LLDB_ENABLE_PYTHON)
+ if (NOT SWIG_FOUND)
+ message(FATAL_ERROR
+ "The SWIG package is required for Python support in LLDB.")
+ endif()
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lldb.py
@@ -57,6 +61,10 @@
endif()
if (LLDB_ENABLE_LUA)
+ if (NOT SWIG_FOUND)
+ message(FATAL_ERROR
+ "The SWIG package is required for LUA support in LLDB.")
+ endif()
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapLua.cpp
DEPENDS ${SWIG_SOURCES}
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits