default android to unwind

This commit is contained in:
akallabeth 2022-04-29 13:41:44 +02:00 committed by akallabeth
parent 9330559d24
commit f10da4552b
2 changed files with 7 additions and 1 deletions

View File

@ -185,7 +185,9 @@ if(NOT IOS)
check_include_files(syslog.h HAVE_SYSLOG_H)
check_include_files(sys/select.h HAVE_SYS_SELECT_H)
check_include_files(sys/eventfd.h HAVE_SYS_EVENTFD_H)
check_include_files(unwind.h HAVE_UNWIND_H)
if (ANDROID)
check_include_files(unwind.h HAVE_UNWIND_H)
endif()
if (HAVE_SYS_EVENTFD_H)
check_symbol_exists(eventfd_read sys/eventfd.h WITH_EVENTFD_READ_WRITE)
endif()

View File

@ -104,6 +104,10 @@ set(SRCS
if (ANDROID)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
if (NOT HAVE_UNWIND_H)
message("[backtrace] android NDK without unwind.h, falling back to corkscrew")
set(HAVE_CORKSCREW 1)
endif()
endif()
if (HAVE_CORKSCREW)