This revision was not accepted when it landed; it landed in state "Needs 
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe0053bc04e6b: [lldb] Bump SWIG minimum version to 4 
(authored by JDevlieghere).
Herald added a project: LLDB.

Changed prior to commit:
  https://reviews.llvm.org/D156804?vs=546093&id=547354#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156804/new/

https://reviews.llvm.org/D156804

Files:
  lldb/bindings/python/python.swig
  lldb/cmake/modules/FindLuaAndSwig.cmake
  lldb/cmake/modules/FindPythonAndSwig.cmake
  lldb/cmake/modules/LLDBConfig.cmake
  lldb/docs/resources/build.rst
  
lldb/test/API/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
  lldb/test/API/python_api/lldbutil/TestSwigVersion.py
  lldb/test/API/python_api/module_section/TestModuleAndSection.py
  lldb/test/API/python_api/value/linked_list/TestValueAPILinkedList.py

Index: lldb/test/API/python_api/value/linked_list/TestValueAPILinkedList.py
===================================================================
--- lldb/test/API/python_api/value/linked_list/TestValueAPILinkedList.py
+++ lldb/test/API/python_api/value/linked_list/TestValueAPILinkedList.py
@@ -20,9 +20,6 @@
         # Find the line number to break at.
         self.line = line_number("main.cpp", "// Break at this line")
 
-    # Py3 asserts due to a bug in SWIG.  A fix for this was upstreamed into
-    # SWIG 3.0.8.
-    @skipIf(py_version=[">=", (3, 0)], swig_version=["<", (3, 0, 8)])
     def test(self):
         """Exercise SBValue API linked_list_iter."""
         d = {"EXE": self.exe_name}
Index: lldb/test/API/python_api/module_section/TestModuleAndSection.py
===================================================================
--- lldb/test/API/python_api/module_section/TestModuleAndSection.py
+++ lldb/test/API/python_api/module_section/TestModuleAndSection.py
@@ -10,9 +10,6 @@
 
 
 class ModuleAndSectionAPIsTestCase(TestBase):
-    # Py3 asserts due to a bug in SWIG.  A fix for this was upstreamed into
-    # SWIG 3.0.8.
-    @skipIf(py_version=[">=", (3, 0)], swig_version=["<", (3, 0, 8)])
     def test_module_and_section(self):
         """Test module and section APIs."""
         self.build()
Index: lldb/test/API/python_api/lldbutil/TestSwigVersion.py
===================================================================
--- lldb/test/API/python_api/lldbutil/TestSwigVersion.py
+++ lldb/test/API/python_api/lldbutil/TestSwigVersion.py
@@ -21,6 +21,6 @@
         self.assertTrue(getattr(lldb, "swig_version"))
         self.assertIsInstance(lldb.swig_version, tuple)
         self.assertEqual(len(lldb.swig_version), 3)
-        self.assertGreaterEqual(lldb.swig_version[0], 1)
+        self.assertGreaterEqual(lldb.swig_version[0], 4)
         for v in lldb.swig_version:
             self.assertGreaterEqual(v, 0)
Index: lldb/test/API/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
===================================================================
--- lldb/test/API/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
+++ lldb/test/API/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
@@ -117,8 +117,6 @@
 
         sb_debugger.fuzz_obj(obj)
 
-    # darwin: This test passes with swig 3.0.2, fails w/3.0.5 other tests fail
-    # with 2.0.12 http://llvm.org/pr23488
     def test_SBError(self):
         obj = lldb.SBError()
         if self.TraceOn():
@@ -225,9 +223,6 @@
 
         sb_listener.fuzz_obj(obj)
 
-    # Py3 asserts due to a bug in SWIG.  Trying to upstream a patch to fix
-    # this in 3.0.8
-    @skipIf(py_version=[">=", (3, 0)], swig_version=["<", (3, 0, 8)])
     def test_SBModule(self):
         obj = lldb.SBModule()
         if self.TraceOn():
Index: lldb/docs/resources/build.rst
===================================================================
--- lldb/docs/resources/build.rst
+++ lldb/docs/resources/build.rst
@@ -34,7 +34,7 @@
 scripting support.
 
 * `Python <http://www.python.org/>`_
-* `SWIG <http://swig.org/>`_ 3 or later.
+* `SWIG <http://swig.org/>`_ 4 or later.
 
 Optional Dependencies
 *********************
Index: lldb/cmake/modules/LLDBConfig.cmake
===================================================================
--- lldb/cmake/modules/LLDBConfig.cmake
+++ lldb/cmake/modules/LLDBConfig.cmake
@@ -50,7 +50,7 @@
   message(STATUS "${description}: ${${variable}}")
 endmacro()
 
-add_optional_dependency(LLDB_ENABLE_SWIG "Enable SWIG to generate LLDB bindings" SWIG SWIG_FOUND VERSION 3)
+add_optional_dependency(LLDB_ENABLE_SWIG "Enable SWIG to generate LLDB bindings" SWIG SWIG_FOUND VERSION 4)
 add_optional_dependency(LLDB_ENABLE_LIBEDIT "Enable editline support in LLDB" LibEdit LibEdit_FOUND)
 add_optional_dependency(LLDB_ENABLE_CURSES "Enable curses support in LLDB" CursesAndPanel CURSESANDPANEL_FOUND)
 add_optional_dependency(LLDB_ENABLE_LZMA "Enable LZMA compression support in LLDB" LibLZMA LIBLZMA_FOUND)
Index: lldb/cmake/modules/FindPythonAndSwig.cmake
===================================================================
--- lldb/cmake/modules/FindPythonAndSwig.cmake
+++ lldb/cmake/modules/FindPythonAndSwig.cmake
@@ -40,7 +40,7 @@
   if (LLDB_ENABLE_SWIG)
     FindPython3()
   else()
-    message(STATUS "SWIG 3 or later is required for Python support in LLDB but could not be found")
+    message(STATUS "SWIG 4 or later is required for Python support in LLDB but could not be found")
   endif()
 
   get_property(MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
Index: lldb/cmake/modules/FindLuaAndSwig.cmake
===================================================================
--- lldb/cmake/modules/FindLuaAndSwig.cmake
+++ lldb/cmake/modules/FindLuaAndSwig.cmake
@@ -15,7 +15,7 @@
         LUA_INCLUDE_DIR)
     endif()
   else()
-    message(STATUS "SWIG 3 or later is required for Lua support in LLDB but could not be found")
+    message(STATUS "SWIG 4 or later is required for Lua support in LLDB but could not be found")
   endif()
 
 
Index: lldb/bindings/python/python.swig
===================================================================
--- lldb/bindings/python/python.swig
+++ lldb/bindings/python/python.swig
@@ -52,10 +52,6 @@
     # Relative import should work if we are being loaded by Python.
     from . import $module"
 %enddef
-// These versions will not generate working python modules, so error out early.
-#if SWIG_VERSION >= 0x030009 && SWIG_VERSION < 0x030011
-#error Swig versions 3.0.9 and 3.0.10 are incompatible with lldb.
-#endif
 
 // The name of the module to be created.
 %module(docstring=DOCSTRING, moduleimport=MODULEIMPORT) lldb
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to