diff --git a/CMakeLists.txt b/CMakeLists.txt index fc7907b13..0cc68d916 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -276,9 +276,12 @@ elseif(BUILD_CLIENT) install(FILES ${SENTRY_SHARED_LIBRARY} DESTINATION ${SYSCONFDIR}/${APPLICATION_SHORTNAME}) # Crashpad_handler - find_program(CRASHPAD_HANDLER_PROGRAM NAMES crashpad_handler NO_CACHE) - message(STATUS "crashpad_handler found in ${CRASHPAD_HANDLER_PROGRAM}") - install(PROGRAMS ${CRASHPAD_HANDLER_PROGRAM} DESTINATION ${CMAKE_INSTALL_BINDIR}) + message(STATUS "CMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}") + if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") + find_program(CRASHPAD_HANDLER_PROGRAM NAMES crashpad_handler NO_CACHE) + message(STATUS "crashpad_handler found in ${CRASHPAD_HANDLER_PROGRAM}") + install(PROGRAMS ${CRASHPAD_HANDLER_PROGRAM} DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif () # xxHash find_library(XXHASH_SHARED_LIBRARY NAMES xxhash NO_CACHE) diff --git a/src/libcommon/log/sentry/handler.cpp b/src/libcommon/log/sentry/handler.cpp index 8ad9714cf..3ca98fa2d 100644 --- a/src/libcommon/log/sentry/handler.cpp +++ b/src/libcommon/log/sentry/handler.cpp @@ -223,7 +223,9 @@ void Handler::init(AppType appType, int breadCrumbsSize) { // Sentry init sentry_options_t *options = sentry_options_new(); sentry_options_set_dsn(options, ((appType == AppType::Server) ? SENTRY_SERVER_DSN : SENTRY_CLIENT_DSN)); -#if defined(Q_OS_WIN) || defined(Q_OS_MAC) +#if defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(__x86_64__) + // TODO: On Linux arm64, Sentry is built with breakpad instead of crashpad_handler until support of Ubuntu 20.04 is + // discontinued const SyncPath appWorkingPath = CommonUtility::getAppWorkingDir() / SENTRY_CRASHPAD_HANDLER_NAME; #endif @@ -232,7 +234,7 @@ void Handler::init(AppType appType, int breadCrumbsSize) { #if defined(Q_OS_WIN) sentry_options_set_handler_pathw(options, appWorkingPath.c_str()); sentry_options_set_database_pathw(options, appSupportPath.c_str()); -#elif defined(Q_OS_MAC) +#elif defined(Q_OS_MAC) || defined(__x86_64__) sentry_options_set_handler_path(options, appWorkingPath.c_str()); sentry_options_set_database_path(options, appSupportPath.c_str()); #endif