From 3e3f508f6d1850f8ddc009146936ae9ee92bdadf Mon Sep 17 00:00:00 2001 From: Amir Masoud Abdol Date: Mon, 16 Jan 2023 18:35:08 +0100 Subject: [PATCH] Add the ltcg flag to .pri files QT_FEATURE_ltcg is TRUE if either of CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON or CMAKE_INTERPROCEDURAL_OPTIMIZATION_=ON are passed to the configure, or the cmake command. Change-Id: Ibaece67de6cc6f89e505038fd02fb50008c47d48 Reviewed-by: Alexandru Croitor (cherry picked from commit 9c90cd7fb969f8907a68ec330a3dbd27842a928a) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtPriHelpers.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/QtPriHelpers.cmake b/cmake/QtPriHelpers.cmake index 2b3128ef6c3..c619a50f30f 100644 --- a/cmake/QtPriHelpers.cmake +++ b/cmake/QtPriHelpers.cmake @@ -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)