Skip to content

Commit fbfd831

Browse files
committed
[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
1 parent 3136cbe commit fbfd831

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

lldb/bindings/lua/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ add_custom_command(
55
DEPENDS ${SWIG_HEADERS}
66
COMMAND ${SWIG_EXECUTABLE}
77
${SWIG_COMMON_FLAGS}
8+
-I${CMAKE_CURRENT_SOURCE_DIR}
89
-lua
910
-w503
1011
-outdir ${CMAKE_CURRENT_BINARY_DIR}

lldb/bindings/lua/lua.swig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
%module lldb
1010

1111
%include <std_string.i>
12-
%include "./lua/lua-typemaps.swig"
13-
%include "./macros.swig"
14-
%include "./headers.swig"
12+
%include "lua-typemaps.swig"
13+
%include "macros.swig"
14+
%include "headers.swig"
1515

1616
%{
1717
using namespace lldb_private;
1818
using namespace lldb;
1919
%}
2020

21-
%include "./interfaces.swig"
21+
%include "interfaces.swig"

lldb/bindings/python/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ add_custom_command(
66
DEPENDS ${SWIG_HEADERS}
77
COMMAND ${SWIG_EXECUTABLE}
88
${SWIG_COMMON_FLAGS}
9+
-I${CMAKE_CURRENT_SOURCE_DIR}
910
-c++
1011
-shadow
1112
-python

lldb/bindings/python/python.swig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ def lldb_iter(obj, getsize, getelem):
111111
%}
112112

113113
%include <std_string.i>
114-
%include "./python/python-typemaps.swig"
115-
%include "./macros.swig"
116-
%include "./headers.swig"
114+
%include "python-typemaps.swig"
115+
%include "macros.swig"
116+
%include "headers.swig"
117117

118118
%{
119119
#include "../source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h"
@@ -123,9 +123,9 @@ using namespace lldb_private::python;
123123
using namespace lldb;
124124
%}
125125

126-
%include "./interfaces.swig"
127-
%include "./python/python-extensions.swig"
128-
%include "./python/python-wrapper.swig"
126+
%include "interfaces.swig"
127+
%include "python-extensions.swig"
128+
%include "python-wrapper.swig"
129129

130130
%pythoncode%{
131131
_initialize = True

0 commit comments

Comments
 (0)