mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-02 20:36:44 +01:00
Add a makefile target to dump and upload breakpad symbols
This commit is contained in:
parent
8fae3bfa9c
commit
796f803028
2
3rdparty/google-breakpad/CMakeLists.txt
vendored
2
3rdparty/google-breakpad/CMakeLists.txt
vendored
@ -91,6 +91,8 @@ endif()
|
||||
|
||||
add_library(libbreakpad_common STATIC ${COMMON_SOURCES})
|
||||
add_library(breakpad STATIC ${LIBRARY_SOURCES})
|
||||
|
||||
# This is used by cmake/DumpSymbols.cmake
|
||||
add_executable(dump_syms ${DUMP_SYMS_SOURCES})
|
||||
|
||||
target_link_libraries(breakpad libbreakpad_common)
|
||||
|
@ -454,6 +454,10 @@ if(HAVE_MOODBAR)
|
||||
add_subdirectory(gst/moodbar)
|
||||
endif()
|
||||
|
||||
# Breakpad symbol target. Included after everything else since it uses some
|
||||
# variables defined above.
|
||||
include(cmake/DumpSymbols.cmake)
|
||||
|
||||
# Uninstall support
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
||||
|
14
cmake/DumpSymbols.cmake
Normal file
14
cmake/DumpSymbols.cmake
Normal file
@ -0,0 +1,14 @@
|
||||
if (HAVE_BREAKPAD)
|
||||
add_custom_target(breakpad_symbols
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMAND python
|
||||
../dist/dump_all_symbols.py
|
||||
--symbols_directory breakpad_symbols
|
||||
--dump_syms_binary "$<TARGET_FILE:dump_syms>"
|
||||
--crashreporting_hostname "${CRASHREPORTING_HOSTNAME}"
|
||||
"$<TARGET_FILE:clementine>"
|
||||
COMMENT "Dumping and uploading breakpad symbols to ${CRASHREPORTING_HOSTNAME}"
|
||||
)
|
||||
|
||||
add_dependencies(breakpad_symbols clementine dump_syms)
|
||||
endif()
|
9
dist/dump_all_symbols.py
vendored
9
dist/dump_all_symbols.py
vendored
@ -28,7 +28,14 @@ class BaseDumperImpl(object):
|
||||
raise NotImplementedError
|
||||
|
||||
def DebugSymbolsFilename(self, filename):
|
||||
return filename
|
||||
class Context(object):
|
||||
def __enter__(self):
|
||||
return filename
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
pass
|
||||
|
||||
return Context()
|
||||
|
||||
|
||||
class LinuxDumperImpl(BaseDumperImpl):
|
||||
|
Loading…
x
Reference in New Issue
Block a user