diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-08-19 22:13:53 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-20 12:50:50 +0000 |
commit | 1d17a5a0520ae99ba1832f5db2ee8615fe9df010 (patch) | |
tree | 11bb8394de739c95f560b440fecbf479d89d84db /configure.cmake | |
parent | 322e035841d7ac3acc6ecdec615ee5a736986e9a (diff) |
Fix Android -ltcg build
We're passing -Oz for release builds, but that's not a flag the linker
understands when -ltcg is enabled. The build fails with:
ld.gold: fatal error: Optimization level must be between 0 and 3
Fix this by using -O2, which -Oz is based on, and -O3 for the "full
optimization" that is used for core and gui.
Fixes: QTBUG-89472
Change-Id: Ie1a86888baefce5ca97026e7d635f10d2819f9f4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 80de5165658e1cfb12d0813ea93dcfecca0dcb45)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake index a7f2cd5e5c..0bf3cf2993 100644 --- a/configure.cmake +++ b/configure.cmake @@ -611,6 +611,12 @@ qt_feature("ltcg" CONDITION __qt_ltcg_detected ) qt_feature_config("ltcg" QMAKE_PRIVATE_CONFIG) + +if(NOT QT_CONFIGURE_RUNNING) + # This feature is used early in QtCompilerOptimization.cmake. + qt_evaluate_feature(ltcg) +endif() + qt_feature("enable_new_dtags" LABEL "Using new DTAGS" CONDITION LINUX AND TEST_enable_new_dtags |