summaryrefslogtreecommitdiffstats
path: root/externals
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-10-30 04:41:13 +0100
committerGitHub <noreply@github.com>2023-10-30 04:41:13 +0100
commiteec3d356b69711b34145d16e669e25403880774e (patch)
tree55ea35e1fe80f8539ec7fd7ec2aaa3164a5679d1 /externals
parentMerge pull request #11911 from german77/leak_event (diff)
parentqt: implement automatic crash dump support (diff)
downloadyuzu-eec3d356b69711b34145d16e669e25403880774e.tar
yuzu-eec3d356b69711b34145d16e669e25403880774e.tar.gz
yuzu-eec3d356b69711b34145d16e669e25403880774e.tar.bz2
yuzu-eec3d356b69711b34145d16e669e25403880774e.tar.lz
yuzu-eec3d356b69711b34145d16e669e25403880774e.tar.xz
yuzu-eec3d356b69711b34145d16e669e25403880774e.tar.zst
yuzu-eec3d356b69711b34145d16e669e25403880774e.zip
Diffstat (limited to 'externals')
-rw-r--r--externals/CMakeLists.txt102
m---------externals/breakpad0
m---------externals/dynarmic0
3 files changed, 102 insertions, 0 deletions
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index 6e5bfbba6..61baabb03 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -189,3 +189,105 @@ if (ANDROID)
add_subdirectory(libadrenotools)
endif()
endif()
+
+# Breakpad
+# https://github.com/microsoft/vcpkg/blob/master/ports/breakpad/CMakeLists.txt
+if (YUZU_CRASH_DUMPS AND NOT TARGET libbreakpad_client)
+ set(BREAKPAD_WIN32_DEFINES
+ NOMINMAX
+ UNICODE
+ WIN32_LEAN_AND_MEAN
+ _CRT_SECURE_NO_WARNINGS
+ _CRT_SECURE_NO_DEPRECATE
+ _CRT_NONSTDC_NO_DEPRECATE
+ )
+
+ # libbreakpad
+ add_library(libbreakpad STATIC)
+ file(GLOB_RECURSE LIBBREAKPAD_SOURCES breakpad/src/processor/*.cc)
+ file(GLOB_RECURSE LIBDISASM_SOURCES breakpad/src/third_party/libdisasm/*.c)
+ list(FILTER LIBBREAKPAD_SOURCES EXCLUDE REGEX "_unittest|_selftest|synth_minidump|/tests|/testdata|/solaris|microdump_stackwalk|minidump_dump|minidump_stackwalk")
+ if (WIN32)
+ list(FILTER LIBBREAKPAD_SOURCES EXCLUDE REGEX "/linux|/mac|/android")
+ target_compile_definitions(libbreakpad PRIVATE ${BREAKPAD_WIN32_DEFINES})
+ target_include_directories(libbreakpad PRIVATE "${CMAKE_GENERATOR_INSTANCE}/DIA SDK/include")
+ elseif (APPLE)
+ list(FILTER LIBBREAKPAD_SOURCES EXCLUDE REGEX "/linux|/windows|/android")
+ else()
+ list(FILTER LIBBREAKPAD_SOURCES EXCLUDE REGEX "/mac|/windows|/android")
+ endif()
+ target_sources(libbreakpad PRIVATE ${LIBBREAKPAD_SOURCES} ${LIBDISASM_SOURCES})
+ target_include_directories(libbreakpad
+ PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/breakpad/src
+ ${CMAKE_CURRENT_SOURCE_DIR}/breakpad/src/third_party/libdisasm
+ )
+
+ # libbreakpad_client
+ add_library(libbreakpad_client STATIC)
+ file(GLOB LIBBREAKPAD_COMMON_SOURCES breakpad/src/common/*.cc breakpad/src/common/*.c breakpad/src/client/*.cc)
+
+ if (WIN32)
+ file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES breakpad/src/client/windows/*.cc breakpad/src/common/windows/*.cc)
+ list(FILTER LIBBREAKPAD_COMMON_SOURCES EXCLUDE REGEX "language.cc|path_helper.cc|stabs_to_module.cc|stabs_reader.cc|minidump_file_writer.cc")
+ target_include_directories(libbreakpad_client PRIVATE "${CMAKE_GENERATOR_INSTANCE}/DIA SDK/include")
+ target_compile_definitions(libbreakpad_client PRIVATE ${BREAKPAD_WIN32_DEFINES})
+ elseif (APPLE)
+ target_compile_definitions(libbreakpad_client PRIVATE HAVE_MACH_O_NLIST_H)
+ file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES breakpad/src/client/mac/*.cc breakpad/src/common/mac/*.cc)
+ list(APPEND LIBBREAKPAD_CLIENT_SOURCES breakpad/src/common/mac/MachIPC.mm)
+ else()
+ target_compile_definitions(libbreakpad_client PUBLIC -DHAVE_A_OUT_H)
+ file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES breakpad/src/client/linux/*.cc breakpad/src/common/linux/*.cc)
+ endif()
+ list(APPEND LIBBREAKPAD_CLIENT_SOURCES ${LIBBREAKPAD_COMMON_SOURCES})
+ list(FILTER LIBBREAKPAD_CLIENT_SOURCES EXCLUDE REGEX "/sender|/tests|/unittests|/testcases|_unittest|_test")
+ target_sources(libbreakpad_client PRIVATE ${LIBBREAKPAD_CLIENT_SOURCES})
+ target_include_directories(libbreakpad_client PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/breakpad/src)
+
+ if (WIN32)
+ target_link_libraries(libbreakpad_client PRIVATE wininet.lib)
+ elseif (APPLE)
+ find_library(CoreFoundation_FRAMEWORK CoreFoundation)
+ target_link_libraries(libbreakpad_client PRIVATE ${CoreFoundation_FRAMEWORK})
+ else()
+ find_library(PTHREAD_LIBRARIES pthread)
+ target_compile_definitions(libbreakpad_client PRIVATE HAVE_GETCONTEXT=1)
+ if (PTHREAD_LIBRARIES)
+ target_link_libraries(libbreakpad_client PRIVATE ${PTHREAD_LIBRARIES})
+ endif()
+ endif()
+
+ # Host tools for symbol processing
+ if (LINUX)
+ find_package(ZLIB REQUIRED)
+
+ add_executable(minidump_stackwalk breakpad/src/processor/minidump_stackwalk.cc)
+ target_link_libraries(minidump_stackwalk PRIVATE libbreakpad libbreakpad_client)
+
+ add_executable(dump_syms
+ breakpad/src/common/dwarf_cfi_to_module.cc
+ breakpad/src/common/dwarf_cu_to_module.cc
+ breakpad/src/common/dwarf_line_to_module.cc
+ breakpad/src/common/dwarf_range_list_handler.cc
+ breakpad/src/common/language.cc
+ breakpad/src/common/module.cc
+ breakpad/src/common/path_helper.cc
+ breakpad/src/common/stabs_reader.cc
+ breakpad/src/common/stabs_to_module.cc
+ breakpad/src/common/dwarf/bytereader.cc
+ breakpad/src/common/dwarf/dwarf2diehandler.cc
+ breakpad/src/common/dwarf/dwarf2reader.cc
+ breakpad/src/common/dwarf/elf_reader.cc
+ breakpad/src/common/linux/crc32.cc
+ breakpad/src/common/linux/dump_symbols.cc
+ breakpad/src/common/linux/elf_symbols_to_module.cc
+ breakpad/src/common/linux/elfutils.cc
+ breakpad/src/common/linux/file_id.cc
+ breakpad/src/common/linux/linux_libc_support.cc
+ breakpad/src/common/linux/memory_mapped_file.cc
+ breakpad/src/common/linux/safe_readlink.cc
+ breakpad/src/tools/linux/dump_syms/dump_syms.cc)
+ target_link_libraries(dump_syms PRIVATE libbreakpad_client ZLIB::ZLIB)
+ endif()
+endif()
diff --git a/externals/breakpad b/externals/breakpad
new file mode 160000
+Subproject c89f9dddc793f19910ef06c13e4fd240da4e7a5
diff --git a/externals/dynarmic b/externals/dynarmic
-Subproject 7da378033a7764f955516f75194856d87bbcd7a
+Subproject 0df09e2f6b61c2d7ad2f2053d4f020a5c33e037