1
0
mirror of synced 2025-02-13 09:02:37 +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)
set(CMAKE_LINKER ${LD_LLD_PATH})
if (NOT XCODE)
add_compile_options(-fuse-ld=lld)
if (NOT XCODE AND NOT MSVC)
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -fuse-ld=lld)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fuse-ld=lld)
endif()
else ()
message(WARNING "lld not found, using default linker!")
@ -627,8 +628,8 @@ macro(setupCompilerFlags target)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if (IMHEX_ENABLE_UNITY_BUILD AND WIN32)
addCommonFlag("-Wa,mbig-obj" ${target})
if (WIN32)
target_link_options(${target} PUBLIC "-Wa,mbig-obj")
endif ()
endif()