From 8d1adf732dce56ad57cf786d81773b521e171736 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 6 May 2025 05:22:31 +0000 Subject: [PATCH] qttools: adapt to clang from oe-core Clang recipes have been moved from meta-clang layer to oe-core in whinlatter. Adapt qttools to use clang by default also without meta-clang layer, but with the clang recipes from oe-core. Change-Id: I031ac3945100cf74d922d71690296c2ddc2cdc58 Reviewed-by: Ari Parkkila (cherry picked from commit 5af1d30b38f12aca777c77a61fa35a674d9ac7e2) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 44ef3480d3b4766c3b1692760660305c5125841b) --- recipes-qt/qt6/qttools_git.bb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes-qt/qt6/qttools_git.bb b/recipes-qt/qt6/qttools_git.bb index 5a405f3..be6dcf9 100644 --- a/recipes-qt/qt6/qttools_git.bb +++ b/recipes-qt/qt6/qttools_git.bb @@ -26,10 +26,13 @@ SRC_URI += " \ DEPENDS += "qtbase qtdeclarative qttools-native" -QTTOOLS_USE_CLANG ?= "${@ 'clang' if bb.utils.vercmp_string_op(d.getVar('LLVMVERSION') or '', '17', '>') else ''}" +CAN_USE_CLANG = "${@True if bb.utils.vercmp_string_op(d.getVar('LLVMVERSION') or '', '17', '>') or \ + os.path.exists(os.path.join(d.getVar('COREBASE'),'meta/recipes-devtools/clang')) else False}" +CAN_USE_CLANG:mingw32 = "False" + +QTTOOLS_USE_CLANG ?= "${@ 'clang' if bb.utils.to_boolean(d.getVar('CAN_USE_CLANG')) else ''}" PACKAGECONFIG:class-native = "${QTTOOLS_USE_CLANG}" PACKAGECONFIG:class-nativesdk = "${QTTOOLS_USE_CLANG}" -PACKAGECONFIG:remove:mingw32 = "${QTTOOLS_USE_CLANG}" PACKAGECONFIG[clang] = "-DFEATURE_clang=ON,-DFEATURE_clang=OFF,clang"