Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure sentry handler for Linux amd64 #469

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions src/libcommon/log/sentry/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
Loading