Now that we have an LLDB package, make the "lldb.macosx.crashlog" module work with all of the new module paths.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155528 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/finish-swig-Python-LLDB.sh b/scripts/Python/finish-swig-Python-LLDB.sh
index c6a4651..3f02495 100755
--- a/scripts/Python/finish-swig-Python-LLDB.sh
+++ b/scripts/Python/finish-swig-Python-LLDB.sh
@@ -240,12 +240,24 @@
package_files="${SRC_ROOT}/examples/python/symbolication.py"
create_python_package "/utils" "${package_files}"
-# lldb/macosx
-package_files="${SRC_ROOT}/examples/python/crashlog.py
-${SRC_ROOT}/examples/darwin/heap_find/heap.py"
-create_python_package "/macosx" "${package_files}"
+if [ ${OS_NAME} == "Darwin" ]
+then
+ # lldb/macosx
+ package_files="${SRC_ROOT}/examples/python/crashlog.py
+ ${SRC_ROOT}/examples/darwin/heap_find/heap.py"
+ create_python_package "/macosx" "${package_files}"
+ # Copy files needed by lldb/macosx/heap.py to build libheap.dylib
+ heap_dir="${framework_python_dir}/macosx/heap"
+ if [ ! -d "${heap_dir}" ]
+ then
+ mkdir -p "${heap_dir}"
+ cp "${SRC_ROOT}/examples/darwin/heap_find/heap/heap_find.cpp" "${heap_dir}"
+ cp "${SRC_ROOT}/examples/darwin/heap_find/heap/Makefile" "${heap_dir}"
+ fi
+fi
fi
+
exit 0