From 1d17a5a0520ae99ba1832f5db2ee8615fe9df010 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 19 Aug 2021 22:13:53 +0200 Subject: 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 (cherry picked from commit 80de5165658e1cfb12d0813ea93dcfecca0dcb45) Reviewed-by: Qt Cherry-pick Bot --- configure.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configure.cmake') 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 -- cgit v1.2.3