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 <ari.parkkila@qt.io>
(cherry picked from commit 5af1d30b38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 44ef3480d3)
This commit is contained in:
Samuli Piippo 2025-05-06 05:22:31 +00:00 committed by Qt Cherry-pick Bot
parent dbf9670206
commit 8d1adf732d

View File

@ -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"