Author: tberghammer Date: Fri May 20 05:58:55 2016 New Revision: 270201 URL: http://llvm.org/viewvc/llvm-project?rev=270201&view=rev Log: Work around android-arm NDK bug exposed by rL269992
In the android-arm ndk there is a duplicated typedef in link.h and in unwind.h causing build erros. This CL introduces a HACK to prevent LLVM from finding unwind.h to fix the issue. Modified: lldb/trunk/cmake/platforms/Android.cmake Modified: lldb/trunk/cmake/platforms/Android.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/platforms/Android.cmake?rev=270201&r1=270200&r2=270201&view=diff ============================================================================== --- lldb/trunk/cmake/platforms/Android.cmake (original) +++ lldb/trunk/cmake/platforms/Android.cmake Fri May 20 05:58:55 2016 @@ -165,6 +165,15 @@ set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY O 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 ) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits