Statically link libraries for mingw

This commit is contained in:
momo5502
2025-05-31 11:50:34 +02:00
parent 2e1c1b23c9
commit 98010268a6
3 changed files with 10 additions and 3 deletions

View File

@@ -528,6 +528,9 @@ jobs:
name: Windows 2022 Emulation Root name: Windows 2022 Emulation Root
path: build/release/artifacts/root path: build/release/artifacts/root
- name: Copy Test Sample
run: cp build/release/artifacts/test-sample.exe build/release/artifacts/root/filesys/c/
- name: CMake Test - name: CMake Test
run: cd build/release/artifacts && ./windows-emulator-test.exe run: cd build/release/artifacts && ./windows-emulator-test.exe
env: env:

View File

@@ -64,6 +64,13 @@ endif()
########################################## ##########################################
if(MINGW) if(MINGW)
add_link_options(
-static-libstdc++
-static-libgcc
-static
-lwinpthread
)
momo_add_c_and_cxx_compile_options( momo_add_c_and_cxx_compile_options(
-Wno-array-bounds -Wno-array-bounds
) )

View File

@@ -9,9 +9,6 @@ momo_add_subdirectory_and_get_targets("backends" BACKEND_TARGETS)
momo_targets_set_folder("backends" ${BACKEND_TARGETS}) momo_targets_set_folder("backends" ${BACKEND_TARGETS})
if (NOT MOMO_BUILD_AS_LIBRARY) if (NOT MOMO_BUILD_AS_LIBRARY)
if (MINGW)
add_link_options(-static-libstdc++ -static -lwinpthread)
endif()
add_subdirectory(analyzer) add_subdirectory(analyzer)
add_subdirectory(debugger) add_subdirectory(debugger)
add_subdirectory(fuzzing-engine) add_subdirectory(fuzzing-engine)