ClangCodeModel: Enable big object flags for building on Windows

Fixes problems with debug builds that link too many symbols into
the binary.

Change-Id: I6e95d6abd99a4f2a9a78764d8155a6e7b7fa8571
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Cristian Adam
2021-11-10 12:44:02 +01:00
parent 730a1e6e42
commit 9d6b8727ee

View File

@@ -61,3 +61,14 @@ extend_qtc_plugin(ClangCodeModel
test/clangdtests.cpp test/clangdtests.h
test/data/clangtestdata.qrc
)
if(MINGW)
set(big_obj_compile_option "-Wa,-mbig-obj")
elseif(MSVC)
set(big_obj_compile_option "/bigobj")
endif()
extend_qtc_plugin(ClangCodeModel
CONDITION DEFINED big_obj_compile_option
PROPERTIES COMPILE_OPTIONS ${big_obj_compile_option}
)