OSDN Git Service

[lldb] Bump the required SWIG version to 3
authorJonas Devlieghere <jonas@devlieghere.com>
Fri, 8 Jan 2021 16:46:19 +0000 (08:46 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Fri, 8 Jan 2021 16:47:21 +0000 (08:47 -0800)
Bump the required SWIG version to 3. If my memory serves me well we last
bumped the required SWIG version to 2 for Python 3. At that time SWIG 3
had already been around for a while so everyone I know was already using
that.

It appears that SWIG 3 is the only version that officially supports
C++11 which we're using in the typemap. SWIG 3 was released in 2014 so I
think it's reasonable to make that the minimum required version.

https://bugs.llvm.org/show_bug.cgi?id=48685

Differential revision: https://reviews.llvm.org/D94244

lldb/cmake/modules/FindLuaAndSwig.cmake
lldb/cmake/modules/FindPythonAndSwig.cmake
lldb/docs/resources/build.rst

index 968f905..f6251bb 100644 (file)
@@ -7,7 +7,7 @@
 if(LUA_LIBRARIES AND LUA_INCLUDE_DIR AND SWIG_EXECUTABLE)
   set(LUAANDSWIG_FOUND TRUE)
 else()
-  find_package(SWIG 2.0)
+  find_package(SWIG 3.0)
   if (SWIG_FOUND)
     find_package(Lua 5.3)
     if(LUA_FOUND AND SWIG_FOUND)
@@ -17,7 +17,7 @@ else()
         SWIG_EXECUTABLE)
     endif()
   else()
-    message(STATUS "SWIG 2 or later is required for Lua support in LLDB but could not be found")
+    message(STATUS "SWIG 3 or later is required for Lua support in LLDB but could not be found")
   endif()
 
   include(FindPackageHandleStandardArgs)
index dcbc386..3535b54 100644 (file)
@@ -38,11 +38,11 @@ endmacro()
 if(Python3_LIBRARIES AND Python3_INCLUDE_DIRS AND Python3_EXECUTABLE AND SWIG_EXECUTABLE)
   set(PYTHONANDSWIG_FOUND TRUE)
 else()
-  find_package(SWIG 2.0)
+  find_package(SWIG 3.0)
   if (SWIG_FOUND)
       FindPython3()
   else()
-    message(STATUS "SWIG 2 or later is required for Python support in LLDB but could not be found")
+    message(STATUS "SWIG 3 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 8aadd12..825f864 100644 (file)
@@ -34,7 +34,7 @@ If you want to run the test suite, you'll need to build LLDB with Python
 scripting support.
 
 * `Python <http://www.python.org/>`_
-* `SWIG <http://swig.org/>`_ 2 or later.
+* `SWIG <http://swig.org/>`_ 3 or later.
 
 Optional Dependencies
 *********************