[Lldb-commits] [PATCH] Always use python-based SWIG generation script for CMake

Zachary Turner zturner at google.com
Tue Dec 16 15:38:19 PST 2014


Hi emaste, ovyalov, vharron,

As a first step in addressing http://llvm.org/bugs/show_bug.cgi?id=21921 this patch prefers the python-based SWIG generation by default rather than the shell-based SWIG generation any time python is enabled (e.g. LLDB_DISABLE_PYTHON is 0).

Additionally, this patch changes the default value of LLDB_DISABLE_PYTHON from 1 to 0 on Windows.

Anyone not using the CMake build is unaffected by this patch.

http://reviews.llvm.org/D6699

Files:
  CMakeLists.txt

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -1,20 +1,13 @@
 if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
-  set(LLDB_DEFAULT_DISABLE_PYTHON 1)
+  set(LLDB_DEFAULT_DISABLE_PYTHON 0)
   set(LLDB_DEFAULT_DISABLE_CURSES 1)
-  if (LLDB_DISABLE_PYTHON)
-    set(LLDB_DEFAULT_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION 0)
-  else()
-    set(LLDB_DEFAULT_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION 1)
-  endif()
 else()
   if ( __ANDROID_NDK__ )
     set(LLDB_DEFAULT_DISABLE_PYTHON 1)
     set(LLDB_DEFAULT_DISABLE_CURSES 1)
-    set(LLDB_DEFAULT_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION 0)
   else()
     set(LLDB_DEFAULT_DISABLE_PYTHON 0)
     set(LLDB_DEFAULT_DISABLE_CURSES 0)
-    set(LLDB_DEFAULT_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION 0)
   endif()
 endif()
 set(LLDB_DISABLE_PYTHON ${LLDB_DEFAULT_DISABLE_PYTHON} CACHE BOOL
@@ -22,6 +15,12 @@
 set(LLDB_DISABLE_CURSES ${LLDB_DEFAULT_DISABLE_CURSES} CACHE BOOL
   "Disables the Curses integration.")
 
+if ( LLDB_DISABLE_PYTHON )
+  set(LLDB_DEFAULT_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION 0)
+else ()
+  set(LLDB_DEFAULT_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION 1)
+endif ()
+
 set(LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION ${LLDB_DEFAULT_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION} CACHE BOOL
   "Enables using new Python scripts for SWIG API generation .")

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6699.17373.patch
Type: text/x-patch
Size: 1408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20141216/15eb1b1d/attachment.bin>


More information about the lldb-commits mailing list