diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2022-01-06 15:21:40 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-13 10:17:42 +0000 |
commit | b842c4299e661a43f9888cd55b128ef34d102b7e (patch) | |
tree | 0840ada47df4ea835b978b87892fd74fc2769456 /cmake | |
parent | 2045d02393ffae8bbb88deda98798c4d122fb947 (diff) |
Enable -bigobj by default for Qt
Add '-bigobj' for MSVC and '-Wa,-mbig-obj' for MINGW to the
PlatformCommonInternal compiler options.
Change-Id: I706b83d189a116a3ab6f93d59593e237e66b0e2e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 28da24a1a64fc901b858b586d4ce90bdca20d153)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtInternalTargets.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index aee33c5dde..86f43fc1b9 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 $<$<NOT:$<CONFIG:Debug>>:-guard:cf> @@ -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 $<$<COMPILE_LANGUAGE:CXX>:-Wsuggest-override>) endif() |