Build and test MinGW in CI

This commit is contained in:
momo5502
2025-05-31 09:23:20 +02:00
parent 6fcfb0264c
commit 5c0a1ce5c2
8 changed files with 32 additions and 24 deletions

View File

@@ -16,7 +16,7 @@ target_link_libraries(backend-selection PRIVATE
unicorn-emulator
)
if (MOMO_ENABLE_RUST_CODE)
if (MOMO_ENABLE_RUST)
target_link_libraries(backend-selection PRIVATE
icicle-emulator
)

View File

@@ -1,5 +1,5 @@
add_subdirectory(unicorn-emulator)
if (MOMO_ENABLE_RUST_CODE)
if (MOMO_ENABLE_RUST)
add_subdirectory(icicle-emulator)
endif()

View File

@@ -13,7 +13,9 @@ endif()
set(CARGO_TRIPLE)
set(CARGO_OPTIONS)
if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
if (MINGW)
set(CARGO_TRIPLE "x86_64-pc-windows-gnu")
elseif (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
set(CARGO_TRIPLE "wasm32-unknown-emscripten")
elseif(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(CARGO_TRIPLE "i686-pc-windows-msvc")

View File

@@ -17,7 +17,7 @@ target_link_libraries(emulator-common PUBLIC
zlibstatic
)
if(MINGW)
if(WIN)
target_link_libraries(emulator-common PUBLIC
ws2_32
)

View File

@@ -34,7 +34,6 @@
#ifdef _WIN32
using socklen_t = int;
#pragma comment(lib, "ws2_32.lib")
#endif
namespace network

View File

@@ -19,7 +19,7 @@ target_link_libraries(fuzzer PRIVATE
windows-emulator
)
if (MOMO_ENABLE_RUST_CODE)
if (MOMO_ENABLE_RUST)
target_link_libraries(fuzzer PRIVATE
icicle-emulator
)