Enable llgs to build against experimental Android AOSP lldb/llvm/clang/compiler-rt repos.
See http://reviews.llvm.org/D5495 for more details.
These are changes that are part of an effort to support building llgs, within the AOSP source tree, using the Android.mk
build system, when using the llvm/clang/lldb git repos from AOSP replaced with the experimental ones currently in
github.com/tfiala/aosp-{llvm,clang,lldb,compiler-rt}.
llvm-svn: 218568
diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp
index 3d90fbb..175624d 100644
--- a/lldb/source/Host/linux/Host.cpp
+++ b/lldb/source/Host/linux/Host.cpp
@@ -14,7 +14,9 @@
#include <sys/stat.h>
#include <dirent.h>
#include <fcntl.h>
+#ifndef __ANDROID__
#include <execinfo.h>
+#endif
// C++ Includes
// Other libraries and framework includes
@@ -375,6 +377,7 @@
void
Host::Backtrace (Stream &strm, uint32_t max_frames)
{
+#ifndef __ANDROID__
if (max_frames > 0)
{
std::vector<void *> frame_buffer (max_frames, NULL);
@@ -388,6 +391,9 @@
::free (strs);
}
}
+#else
+ assert(false && "::backtrace() not supported on Android");
+#endif
}
size_t