diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 90e5d766b..bf2e2a78d 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -63,12 +63,13 @@ jobs: - name: Build dump_syms working-directory: core/deps/breakpad run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release -G Ninja - cmake --build build --config Release --target dump_syms + ./configure --prefix=$PWD + make -j2 + make install - name: Extract symbols run: | - DUMP_SYMS=./core/deps/breakpad/build/dump_syms + DUMP_SYMS=./core/deps/breakpad/bin/dump_syms SO_DIR=shell/android-studio/flycast/build/intermediates/cmake/release/obj for arch in arm64-v8a armeabi-v7a x86 x86_64 ; do $DUMP_SYMS $SO_DIR/$arch/libflycast.so > libflycast.so.sym diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 6335c06c5..79fe72a7d 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -78,15 +78,7 @@ jobs: uses: msys2/setup-msys2@v2 with: msystem: MINGW64 - install: git base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-breakpad-git mingw-w64-x86_64-lua mingw-w64-x86_64-SDL2 - if: endsWith(matrix.config.name, 'w64-mingw32') - - - name: Downgrade gcc to 10.3 - run: | - pacman -U --noconfirm https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-libs-10.3.0-8-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-10.3.0-8-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-ada-10.3.0-8-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-fortran-10.3.0-8-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-libgfortran-10.3.0-8-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-objc-10.3.0-8-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-libgccjit-10.3.0-8-any.pkg.tar.zst - pacman -U --noconfirm https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-crt-git-9.0.0.6246.ae63cde27-1-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-headers-git-9.0.0.6246.ae63cde27-1-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-libmangle-git-9.0.0.6246.ae63cde27-1-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-libwinpthread-git-9.0.0.6246.ae63cde27-1-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-tools-git-9.0.0.6246.ae63cde27-1-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-winpthreads-git-9.0.0.6246.ae63cde27-1-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-winstorecompat-git-9.0.0.6246.ae63cde27-1-any.pkg.tar.zst - pacman -U --noconfirm https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-cmake-3.20.5-2-any.pkg.tar.zst - shell: msys2 {0} + install: git base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-lua mingw-w64-x86_64-SDL2 if: endsWith(matrix.config.name, 'w64-mingw32') - uses: actions/checkout@v2 @@ -141,7 +133,7 @@ jobs: - name: Dump symbols shell: msys2 {0} run: | - dump_syms artifact/bin/flycast.exe > flycast.exe.sym 2>/dev/null + core/deps/breakpad/bin/dump_syms artifact/bin/flycast.exe > flycast.exe.sym 2>/dev/null BUILD_ID=`head -1 flycast.exe.sym | awk '{ print $4 }'` mkdir -p symbols/flycast.exe/$BUILD_ID mv flycast.exe.sym symbols/flycast.exe/$BUILD_ID diff --git a/.github/workflows/uwp.yml b/.github/workflows/uwp.yml index 085e19d10..934e12927 100644 --- a/.github/workflows/uwp.yml +++ b/.github/workflows/uwp.yml @@ -30,7 +30,7 @@ jobs: - name: CMake run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DCMAKE_SYSTEM_PROCESSOR=AMD64 -DCMAKE_CROSSCOMPILING=OFF -DUSE_VULKAN=OFF -DUSE_GLES=ON -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake + cmake -B build -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DCMAKE_SYSTEM_PROCESSOR=AMD64 -DCMAKE_CROSSCOMPILING=OFF -DUSE_VULKAN=OFF -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake cmake --build build --config Release --parallel 2 shell: cmd diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fc47dacf..2e3e2b22a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,22 +184,12 @@ if(NINTENDO_SWITCH) endif() if(NOT LIBRETRO) - if(WIN32 AND NOT MSVC) - target_link_options(${PROJECT_NAME} PRIVATE "-Wl,--build-id") - target_link_libraries(${PROJECT_NAME} PRIVATE breakpad_client) - target_compile_definitions(${PROJECT_NAME} PRIVATE USE_BREAKPAD) -# elseif(APPLE) -# add_subdirectory(core/deps/breakpad) -# target_link_libraries(${PROJECT_NAME} PRIVATE breakpad_client) -# target_include_directories(${PROJECT_NAME} PRIVATE -# core/deps/breakpad/src/client/apple/Framework -# core/deps/breakpad/src/client/mac/Framework) -## target_include_directories(${PROJECT_NAME} PRIVATE $) -# target_compile_definitions(${PROJECT_NAME} PRIVATE USE_BREAKPAD) - elseif(UNIX AND NOT CMAKE_SYSTEM_NAME MATCHES "(FreeBSD|OpenBSD|NetBSD)" AND NOT IOS) + if((WIN32 AND NOT MSVC) OR (UNIX AND NOT CMAKE_SYSTEM_NAME MATCHES "(FreeBSD|OpenBSD|NetBSD)" AND NOT IOS)) add_subdirectory(core/deps/breakpad) - target_link_libraries(${PROJECT_NAME} PRIVATE breakpad_client) - target_include_directories(${PROJECT_NAME} PRIVATE core/deps/breakpad/src) + if(WIN32) + target_link_options(${PROJECT_NAME} PRIVATE "-Wl,--build-id") + endif() + target_link_libraries(${PROJECT_NAME} PUBLIC breakpad_client) target_compile_definitions(${PROJECT_NAME} PRIVATE USE_BREAKPAD) endif() endif() diff --git a/core/deps/breakpad b/core/deps/breakpad index c39da3426..d2657e126 160000 --- a/core/deps/breakpad +++ b/core/deps/breakpad @@ -1 +1 @@ -Subproject commit c39da34265dee163ade62003d0a21a86ec1bee17 +Subproject commit d2657e1267d2ce9399bcc6b9c5b01b465db057b1 diff --git a/core/linux-dist/main.cpp b/core/linux-dist/main.cpp index ea8baaf0d..0f2fa337b 100644 --- a/core/linux-dist/main.cpp +++ b/core/linux-dist/main.cpp @@ -36,7 +36,7 @@ #endif #ifdef USE_BREAKPAD -#include "client/linux/handler/exception_handler.h" +#include "breakpad/client/linux/handler/exception_handler.h" #endif void os_SetupInput()