[lldb] Fix relative imports and set the appropriate include dirs

After moving python.swig and lua.swig into their respective
subdirectories, the relative paths in these files were out of date. This
fixes that and ensures the appropriate include paths are set in the SWIG
invocation.

Differential revision: https://reviews.llvm.org/D85859
This commit is contained in:
Jonas Devlieghere 2020-08-12 15:47:57 -07:00
parent 3136cbe29e
commit fbfd831dda
4 changed files with 12 additions and 10 deletions

View File

@ -5,6 +5,7 @@ add_custom_command(
DEPENDS ${SWIG_HEADERS}
COMMAND ${SWIG_EXECUTABLE}
${SWIG_COMMON_FLAGS}
-I${CMAKE_CURRENT_SOURCE_DIR}
-lua
-w503
-outdir ${CMAKE_CURRENT_BINARY_DIR}

View File

@ -9,13 +9,13 @@
%module lldb
%include <std_string.i>
%include "./lua/lua-typemaps.swig"
%include "./macros.swig"
%include "./headers.swig"
%include "lua-typemaps.swig"
%include "macros.swig"
%include "headers.swig"
%{
using namespace lldb_private;
using namespace lldb;
%}
%include "./interfaces.swig"
%include "interfaces.swig"

View File

@ -6,6 +6,7 @@ add_custom_command(
DEPENDS ${SWIG_HEADERS}
COMMAND ${SWIG_EXECUTABLE}
${SWIG_COMMON_FLAGS}
-I${CMAKE_CURRENT_SOURCE_DIR}
-c++
-shadow
-python

View File

@ -111,9 +111,9 @@ def lldb_iter(obj, getsize, getelem):
%}
%include <std_string.i>
%include "./python/python-typemaps.swig"
%include "./macros.swig"
%include "./headers.swig"
%include "python-typemaps.swig"
%include "macros.swig"
%include "headers.swig"
%{
#include "../source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h"
@ -123,9 +123,9 @@ using namespace lldb_private::python;
using namespace lldb;
%}
%include "./interfaces.swig"
%include "./python/python-extensions.swig"
%include "./python/python-wrapper.swig"
%include "interfaces.swig"
%include "python-extensions.swig"
%include "python-wrapper.swig"
%pythoncode%{
_initialize = True