summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-03-25 23:36:12 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-03-25 23:36:12 +0000
commit1d1f1ba3d240aa0109ed71e6c0aef1e5cf0e6a89 (patch)
tree26076b10555a720b023dd6f86680fd7fe1cdd181
parente6c24299d2373b2c809e4577bae8c308a971485c (diff)
downloadbcm5719-llvm-1d1f1ba3d240aa0109ed71e6c0aef1e5cf0e6a89.tar.gz
bcm5719-llvm-1d1f1ba3d240aa0109ed71e6c0aef1e5cf0e6a89.zip
[Python] Move SWIG wrapper dependency into the plugin
This should fix the Windows bot (fingers crossed). llvm-svn: 356967
-rw-r--r--lldb/source/API/CMakeLists.txt5
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt27
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt2
3 files changed, 28 insertions, 6 deletions
diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index 94c9e338f27..c5b7a9d2a4a 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -4,11 +4,6 @@ endif()
get_property(LLDB_ALL_PLUGINS GLOBAL PROPERTY LLDB_PLUGINS)
-if(NOT LLDB_DISABLE_PYTHON)
- get_target_property(lldb_scripts_dir swig_wrapper BINARY_DIR)
- set(lldb_python_wrapper ${lldb_scripts_dir}/LLDBWrapPython.cpp)
-endif()
-
add_lldb_library(liblldb SHARED
SBAddress.cpp
SBAttachInfo.cpp
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
index 56eacc941d6..86ff4f689bd 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
@@ -11,10 +11,16 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
endif()
endif()
+if(NOT LLDB_DISABLE_PYTHON)
+ get_target_property(lldb_scripts_dir swig_wrapper BINARY_DIR)
+ set(lldb_python_wrapper ${lldb_scripts_dir}/LLDBWrapPython.cpp)
+endif()
+
add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN
PythonDataObjects.cpp
PythonExceptionState.cpp
ScriptInterpreterPython.cpp
+ ${lldb_python_wrapper}
LINK_LIBS
lldbBreakpoint
@@ -26,3 +32,24 @@ add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN
LINK_COMPONENTS
Support
)
+
+if(lldb_python_wrapper)
+ add_dependencies(lldbPluginScriptInterpreterPython swig_wrapper)
+
+ if (MSVC)
+ set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0")
+ else()
+ set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " -w")
+ endif()
+
+ set_source_files_properties(${lldb_python_wrapper} PROPERTIES GENERATED ON)
+ if (CLANG_CL)
+ set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING
+ PROPERTY COMPILE_FLAGS " -Wno-unused-function")
+ endif()
+ if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND
+ NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
+ set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING
+ PROPERTY COMPILE_FLAGS " -Wno-sequence-point -Wno-cast-qual")
+ endif ()
+endif()
diff --git a/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt b/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
index 891ade25b76..ed8c86f6041 100644
--- a/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
+++ b/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
@@ -7,7 +7,7 @@ add_lldb_unittest(ScriptInterpreterPythonTests
lldbHost
lldbPluginScriptInterpreterPython
${PYTHON_LIBRARY}
+ ${lldb_python_wrapper}
LINK_COMPONENTS
Support
)
- \ No newline at end of file
OpenPOWER on IntegriCloud