From f9f405785e1b1f1fa45a15fbac269f4568a68b92 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Wed, 26 Jul 2023 01:12:44 -0400 Subject: [PATCH 1/3] Fix LLVM GHA builds as best I can for now --- .github/workflows/cmake.yml | 2 +- vcpkg.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 00aef7e1b..563b94b5e 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -217,7 +217,7 @@ jobs: - name: Setup NuGet Credentials run: > - & (C:/vcpkg/vcpkg fetch nuget | tail -n 2) + & (C:/vcpkg/vcpkg --vcpkg-root "${{ env.VCPKG_ROOT }}" fetch nuget | tail -n 2) sources add -source "https://nuget.pkg.github.com/86Box/index.json" -storepasswordincleartext diff --git a/vcpkg.json b/vcpkg.json index f9cf6783c..af8c75545 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -9,7 +9,8 @@ "libpng", "sdl2", "rtmidi", - "libslirp" + "libslirp", + "fluidsynth" ], "features": { "qt-ui": { From cc19bce7f2386ca0df5528fe4d959eb594f03972 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 15 Aug 2023 17:28:52 -0400 Subject: [PATCH 2/3] Add entry for ARM32 LLVM (Disabled) --- .github/workflows/cmake.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 563b94b5e..1d4f2bc8d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -191,6 +191,10 @@ jobs: triplet: x64-windows-static toolchain: ./cmake/llvm-win32-x86_64.cmake vcvars: x64 +# - name: ARM +# triplet: arm-windows-static +# toolchain: ./cmake/llvm-win32-arm.cmake +# vcvars: x64_arm - name: ARM64 triplet: arm64-windows-static toolchain: ./cmake/llvm-win32-aarch64.cmake From ad3cca65f683a7578b759d2f32a1cbc63eff4f25 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 15 Aug 2023 19:36:39 -0400 Subject: [PATCH 3/3] Fallthrough fixes for MSVC --- src/include/86box/plat.h | 22 +++++++++++++--------- src/include/86box/plat_fallthrough.h | 10 +++++++--- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/include/86box/plat.h b/src/include/86box/plat.h index 34cf87365..1552b032f 100644 --- a/src/include/86box/plat.h +++ b/src/include/86box/plat.h @@ -55,15 +55,6 @@ extern int strnicmp(const char *s1, const char *s2, size_t n); # define off64_t off_t #endif -#if __has_attribute(fallthrough) -# define fallthrough __attribute__((fallthrough)) -#else -# if __has_attribute(__fallthrough__) -# define fallthrough __attribute__((__fallthrough__)) -# endif -# define fallthrough do {} while (0) /* fallthrough */ -#endif - #ifdef _MSC_VER # define UNUSED(arg) arg #else @@ -89,6 +80,19 @@ extern "C" { # define ssize_t intptr_t #endif +#ifdef _MSC_VER +# define fallthrough do {} while (0) /* fallthrough */ +#else +# if __has_attribute(fallthrough) +# define fallthrough __attribute__((fallthrough)) +# else +# if __has_attribute(__fallthrough__) +# define fallthrough __attribute__((__fallthrough__)) +# endif +# define fallthrough do {} while (0) /* fallthrough */ +# endif +#endif + /* Global variables residing in the platform module. */ extern int dopause; /* system is paused */ extern int mouse_capture; /* mouse is captured in app */ diff --git a/src/include/86box/plat_fallthrough.h b/src/include/86box/plat_fallthrough.h index 8d3f4581b..aadd4e14d 100644 --- a/src/include/86box/plat_fallthrough.h +++ b/src/include/86box/plat_fallthrough.h @@ -18,13 +18,17 @@ #ifndef EMU_PLAT_FALLTHROUGH_H #define EMU_PLAT_FALLTHROUGH_H -#if __has_attribute(__fallthrough__) -# define fallthrough __attribute__((__fallthrough__)) +#ifdef _MSC_VER +# define fallthrough do {} while (0) /* fallthrough */ #else # if __has_attribute(fallthrough) # define fallthrough __attribute__((fallthrough)) +# else +# if __has_attribute(__fallthrough__) +# define fallthrough __attribute__((__fallthrough__)) +# endif +# define fallthrough do {} while (0) /* fallthrough */ # endif -# define fallthrough do {} while (0) /* fallthrough */ #endif #endif /*EMU_PLAT_FALLTHROUGH_H*/