Patch Enrico's changes from r150558 on 2012-02-14 to build even if Python
is not available (LLDB_DISABLE_PYTHON is defined).
Change build-swig-Python.sh to emit an empty LLDBPythonWrap.cpp file if
this build is LLDB_DISABLE_PYTHON.
Change the "Copy to Xcode.app" shell script phase in the lldb.xcodeproj
to only do this copying for Mac native builds.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151035 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/build-swig-Python.sh b/scripts/Python/build-swig-Python.sh
index 5fcbe7a..76c5383 100755
--- a/scripts/Python/build-swig-Python.sh
+++ b/scripts/Python/build-swig-Python.sh
@@ -33,6 +33,15 @@
Debug=0
fi
+# If this project is being built with LLDB_DISABLE_PYTHON defined,
+# don't bother generating Python swig bindings -- we don't have
+# Python available.
+
+if echo $GCC_PREPROCESSOR_DEFINITIONS | grep LLDB_DISABLE_PYTHON
+then
+ echo "" > "${swig_output_file}"
+ exit 0
+fi
HEADER_FILES="${SRC_ROOT}/include/lldb/lldb.h"\
" ${SRC_ROOT}/include/lldb/lldb-defines.h"\