1
0
mirror of synced 2025-02-13 17:12:39 +01:00

build: Fix MinGW build

This commit is contained in:
WerWolv 2025-02-02 17:19:34 +01:00
parent 948cbe0a9c
commit 41b6ef930a

View File

@ -393,8 +393,9 @@ macro(configureCMake)
if (LD_LLD_PATH) if (LD_LLD_PATH)
set(CMAKE_LINKER ${LD_LLD_PATH}) set(CMAKE_LINKER ${LD_LLD_PATH})
if (NOT XCODE) if (NOT XCODE AND NOT MSVC)
add_compile_options(-fuse-ld=lld) set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -fuse-ld=lld)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fuse-ld=lld)
endif() endif()
else () else ()
message(WARNING "lld not found, using default linker!") message(WARNING "lld not found, using default linker!")
@ -627,8 +628,8 @@ macro(setupCompilerFlags target)
endif() endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if (IMHEX_ENABLE_UNITY_BUILD AND WIN32) if (WIN32)
addCommonFlag("-Wa,mbig-obj" ${target}) target_link_options(${target} PUBLIC "-Wa,mbig-obj")
endif () endif ()
endif() endif()