[Lldb-commits] [PATCH] D85859: [lldb] Fix relative imports and set the appropriate include dirs

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 12 15:51:20 PDT 2020


JDevlieghere created this revision.
JDevlieghere added reviewers: LLDB, aprantl.
Herald added a subscriber: mgorny.
JDevlieghere requested review of this revision.

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.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D85859

Files:
  lldb/bindings/lua/CMakeLists.txt
  lldb/bindings/lua/lua.swig
  lldb/bindings/python/CMakeLists.txt
  lldb/bindings/python/python.swig


Index: lldb/bindings/python/python.swig
===================================================================
--- lldb/bindings/python/python.swig
+++ lldb/bindings/python/python.swig
@@ -111,9 +111,9 @@
 %}
 
 %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;
 %}
 
-%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
Index: lldb/bindings/python/CMakeLists.txt
===================================================================
--- lldb/bindings/python/CMakeLists.txt
+++ lldb/bindings/python/CMakeLists.txt
@@ -6,6 +6,7 @@
   DEPENDS ${SWIG_HEADERS}
   COMMAND ${SWIG_EXECUTABLE}
       ${SWIG_COMMON_FLAGS}
+      -I${CMAKE_CURRENT_SOURCE_DIR}
       -c++
       -shadow
       -python
Index: lldb/bindings/lua/lua.swig
===================================================================
--- lldb/bindings/lua/lua.swig
+++ lldb/bindings/lua/lua.swig
@@ -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"
Index: lldb/bindings/lua/CMakeLists.txt
===================================================================
--- lldb/bindings/lua/CMakeLists.txt
+++ lldb/bindings/lua/CMakeLists.txt
@@ -5,6 +5,7 @@
   DEPENDS ${SWIG_HEADERS}
   COMMAND ${SWIG_EXECUTABLE}
       ${SWIG_COMMON_FLAGS}
+      -I${CMAKE_CURRENT_SOURCE_DIR}
       -lua
       -w503
       -outdir ${CMAKE_CURRENT_BINARY_DIR}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85859.285198.patch
Type: text/x-patch
Size: 2061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200812/8c527311/attachment.bin>


More information about the lldb-commits mailing list