Build with breakpad submodule. Use gcc 11 on windows.

This commit is contained in:
Flyinghead 2021-12-20 15:45:46 +01:00
parent cd5a784277
commit 970e594009
6 changed files with 14 additions and 31 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 $<INSTALL_INTERFACE:${CMAKE_INSTALL_LIBDIR}/Breakpad.framework>)
# 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()

@ -1 +1 @@
Subproject commit c39da34265dee163ade62003d0a21a86ec1bee17
Subproject commit d2657e1267d2ce9399bcc6b9c5b01b465db057b1

View File

@ -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()