diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-08-19 22:13:53 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-08-20 09:48:27 +0200 |
commit | 80de5165658e1cfb12d0813ea93dcfecca0dcb45 (patch) | |
tree | edf29c46112990ecd5e0114c6b59ec545dd3eb47 /configure.cmake | |
parent | cd36734ff4ec568124b3f93759f7ba6113a0d75f (diff) | |
download | qtbase-80de5165658e1cfb12d0813ea93dcfecca0dcb45.tar.gz |
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.
Pick-to: 6.2
Fixes: QTBUG-89472
Change-Id: Ie1a86888baefce5ca97026e7d635f10d2819f9f4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
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 99bf667861..635dd58c52 100644 --- a/configure.cmake +++ b/configure.cmake @@ -624,6 +624,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 |