diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index fc98e6215df..c1d97da641c 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -196,7 +196,10 @@ if (MSVC) ) endif() - target_compile_options(PlatformCommonInternal INTERFACE -Zc:wchar_t) + target_compile_options(PlatformCommonInternal INTERFACE + -Zc:wchar_t + -bigobj + ) target_compile_options(PlatformCommonInternal INTERFACE $<$>:-guard:cf -Gw> @@ -208,6 +211,10 @@ if (MSVC) ) endif() +if(MINGW) + target_compile_options(PlatformCommonInternal INTERFACE -Wa,-mbig-obj) +endif() + if (GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "9.2") target_compile_options(PlatformCommonInternal INTERFACE $<$:-Wsuggest-override>) endif()