diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d92f8cf..613a47d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -137,6 +137,13 @@ jobs: - { title: "windows" , host: "windows-2022" , arch: "x64" , cc: "vs2022" , conf: "Debug" , defs: "ASMJIT_TEST=1" } - { title: "windows" , host: "windows-2022" , arch: "x64" , cc: "vs2022" , conf: "Release", defs: "ASMJIT_TEST=1" } + # Cross compiled, cannot run tests (Windows/ARM64). + - { title: "windows" , host: "windows-2022" , arch: "arm64" , cc: "vs2022" , conf: "Debug" , defs: "ASMJIT_TEST=0" } + - { title: "windows" , host: "windows-2022" , arch: "arm64" , cc: "vs2022" , conf: "Release", defs: "ASMJIT_TEST=0" } + + # Cross compiled, cannot run tests (Windows/UWP). + - { title: "windows/uwp" , host: "windows-2022" , arch: "x64" , cc: "vs2022" , conf: "Release", defs: "ASMJIT_TEST=0,CMAKE_SYSTEM_NAME=WindowsStore,CMAKE_SYSTEM_VERSION=10.0,CMAKE_CXX_FLAGS=-D_WIN32_WINNT=0x0A00" } + - { title: "freebsd" , host: "ubuntu-latest" , arch: "x64" , cc: "clang" , conf: "Release", vm: "freebsd", vm_ver: "14.1", defs: "ASMJIT_TEST=1" } - { title: "freebsd" , host: "ubuntu-latest" , arch: "arm64" , cc: "clang" , conf: "Release", vm: "freebsd", vm_ver: "14.1", defs: "ASMJIT_TEST=1" } - { title: "netbsd" , host: "ubuntu-latest" , arch: "x64" , cc: "clang" , conf: "Release", vm: "netbsd" , vm_ver: "10.0", defs: "ASMJIT_TEST=1" } diff --git a/src/asmjit/core/cpuinfo.cpp b/src/asmjit/core/cpuinfo.cpp index 0cf46a5..88f85e0 100644 --- a/src/asmjit/core/cpuinfo.cpp +++ b/src/asmjit/core/cpuinfo.cpp @@ -16,10 +16,6 @@ #endif #endif // ASMJIT_ARCH_X86 -#if !defined(_WIN32) - #include -#endif - #if ASMJIT_ARCH_ARM // Required by various utilities that are required by features detection. #if !defined(_WIN32) @@ -53,6 +49,17 @@ #endif #endif // ASMJIT_ARCH_ARM +#if !defined(_WIN32) && (ASMJIT_ARCH_X86 || ASMJIT_ARCH_ARM) + #include +#endif + +// Unfortunately when compiling in C++11 mode MSVC would warn about unused functions as +// [[maybe_unused]] attribute is not used in that case (it's used only by C++17 mode and later). +#if defined(_MSC_VER) + #pragma warning(push) + #pragma warning(disable: 4505) // unreferenced local function has been removed. +#endif // _MSC_VER + ASMJIT_BEGIN_NAMESPACE // CpuInfo - Detect - Compatibility @@ -1997,4 +2004,8 @@ const CpuInfo& CpuInfo::host() noexcept { return cpuInfoGlobal; } +#if defined(_MSC_VER) + #pragma warning(pop) +#endif // _MSC_VER + ASMJIT_END_NAMESPACE