diff options
-rw-r--r-- | lldb/cmake/platforms/Android.cmake | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lldb/cmake/platforms/Android.cmake b/lldb/cmake/platforms/Android.cmake index 98b695be6ef..9aad65cbe13 100644 --- a/lldb/cmake/platforms/Android.cmake +++ b/lldb/cmake/platforms/Android.cmake @@ -165,6 +165,15 @@ set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) ################# BEGIN EVIL HACK ################## +# In the android-arm NDK unwind.h and link.h contains 2 conflicting +# typedef for _Unwind_Ptr. Force HAVE_UNWIND_BACKTRACE to 0 to prevent +# LLVM from finding unwind.h what would break the build. +if ( ANDROID_ABI STREQUAL "armeabi" ) + set( HAVE_UNWIND_BACKTRACE 0 CACHE INTERNAL "Hack to disable the finding of unwind.h on Android arm" ) +endif() +################# END EVIL HACK #################### + +################# BEGIN EVIL HACK ################## # lldb-server links against libdl even though it's not being used and # libdl.a is currently missing from the toolchain (b.android.com/178517). # Therefore, in order to statically link lldb-server, we need a temporary @@ -178,7 +187,8 @@ if( LLVM_BUILD_STATIC ) void * dlopen (const char *filename, int flag) { return 0; } const char * dlerror (void) { return 0; } void * dlsym (void *handle, const char *symbol) { return 0; } -int dlclose (void *handle) { return 0; }") +int dlclose (void *handle) { return 0; } +int dladdr (const void *addr, Dl_info *info) { return 0; }") set( flags "${CMAKE_C_FLAGS}" ) separate_arguments( flags ) execute_process( COMMAND ${CMAKE_C_COMPILER} ${flags} -c ${libdl}/libdl.c -o ${libdl}/libdl.o ) |