Fixed the Xcode project building of LLVM to be a bit more user friendly:
- If you download and build the sources in the Xcode project, x86_64 builds
by default using the "llvm.zip" checkpointed LLVM.
- If you delete the "lldb/llvm.zip" and the "lldb/llvm" folder, and build the
Xcode project will download the right LLVM sources and build them from
scratch
- If you have a "lldb/llvm" folder already that contains a "lldb/llvm/lib"
directory, we will use the sources you have placed in the LLDB directory.
Python can now be disabled for platforms that don't support it.
Changed the way the libllvmclang.a files get used. They now all get built into
arch specific directories and never get merged into universal binaries as this
was causing issues where you would have to go and delete the file if you wanted
to build an extra architecture slice.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143678 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/build-swig-Python.sh b/scripts/Python/build-swig-Python.sh
index d719122..557f63a 100755
--- a/scripts/Python/build-swig-Python.sh
+++ b/scripts/Python/build-swig-Python.sh
@@ -23,6 +23,8 @@
swig_python_extensions=${SRC_ROOT}/scripts/Python/python-extensions.swig
swig_python_wrapper=${SRC_ROOT}/scripts/Python/python-wrapper.swig
+if [ "x$SDKROOT" = "x" ] ; then
+
if [ -n "$debug_flag" -a "$debug_flag" == "-debug" ]
then
Debug=1
@@ -265,3 +267,9 @@
mv "${swig_output_file}.edited" ${swig_output_file}
fi
fi
+
+else
+ # SDKROOT was not empty, which currently means iOS cross build where python is disabled
+ rm -rf ${swig_output_file}
+ touch ${swig_output_file}
+fi
diff --git a/scripts/Python/finish-swig-Python-LLDB.sh b/scripts/Python/finish-swig-Python-LLDB.sh
index 562250c..f8b3a00 100755
--- a/scripts/Python/finish-swig-Python-LLDB.sh
+++ b/scripts/Python/finish-swig-Python-LLDB.sh
@@ -33,6 +33,10 @@
PYTHON_INSTALL_DIR=$4
debug_flag=$5
+# Make sure SDKROOT is not set, since if it is this is an iOS build where python
+# is disabled
+if [ "x$SDKROOT" = "x" ] ; then
+
if [ -n "$debug_flag" -a "$debug_flag" == "-debug" ]
then
Debug=1
@@ -180,5 +184,7 @@
fi
fi
+fi
+
exit 0