|
|
|
|
@ -60,7 +60,11 @@ if(ENABLE_LIBUNWIND AND UNIX AND NOT ANDROID)
@@ -60,7 +60,11 @@ if(ENABLE_LIBUNWIND AND UNIX AND NOT ANDROID)
|
|
|
|
|
if(LIBUNWIND_LIB) |
|
|
|
|
set(LIBUNWIND_LIBRARIES ${LIBUNWIND_LIB}) |
|
|
|
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64") |
|
|
|
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64") |
|
|
|
|
find_library(LIBUNWIND_ARCH_LIB unwind-aarch64) |
|
|
|
|
else() |
|
|
|
|
find_library(LIBUNWIND_ARCH_LIB unwind-x86_64) |
|
|
|
|
endif() |
|
|
|
|
if(LIBUNWIND_ARCH_LIB) |
|
|
|
|
list(APPEND LIBUNWIND_LIBRARIES ${LIBUNWIND_ARCH_LIB}) |
|
|
|
|
endif() |
|
|
|
|
@ -75,8 +79,12 @@ if(ENABLE_LIBUNWIND AND UNIX AND NOT ANDROID)
@@ -75,8 +79,12 @@ if(ENABLE_LIBUNWIND AND UNIX AND NOT ANDROID)
|
|
|
|
|
endif() |
|
|
|
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64") |
|
|
|
|
list(JOIN LIBUNWIND_LIBRARIES ";" _libunwind_libs_joined) |
|
|
|
|
if(NOT _libunwind_libs_joined MATCHES "unwind-x86_64") |
|
|
|
|
if(NOT _libunwind_libs_joined MATCHES "unwind-x86_64" AND NOT _libunwind_libs_joined MATCHES "unwind-aarch64") |
|
|
|
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64") |
|
|
|
|
find_library(LIBUNWIND_ARCH_LIB unwind-aarch64) |
|
|
|
|
else() |
|
|
|
|
find_library(LIBUNWIND_ARCH_LIB unwind-x86_64) |
|
|
|
|
endif() |
|
|
|
|
if(LIBUNWIND_ARCH_LIB) |
|
|
|
|
list(APPEND LIBUNWIND_LIBRARIES ${LIBUNWIND_ARCH_LIB}) |
|
|
|
|
else() |
|
|
|
|
|