Add the ltcg flag to .pri files

QT_FEATURE_ltcg is TRUE if either of
CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON or
CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>=ON are passed to the
configure, or the cmake command.

Pick-to: 6.5
Change-Id: Ibaece67de6cc6f89e505038fd02fb50008c47d48
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Amir Masoud Abdol 2023-01-16 18:35:08 +01:00
parent 42f555f861
commit 9c90cd7fb9

View File

@ -323,7 +323,9 @@ function(qt_generate_module_pri_file target)
list(APPEND module_internal_config staticlib)
endif()
# TODO: Add the value 'ltcg' to module_internal_config if LTCG is turned on.
if(QT_FEATURE_ltcg)
list(APPEND module_internal_config ltcg)
endif()
list(JOIN module_internal_config " " joined_module_internal_config)