qttools: don't fail on unsupported clang

oe-core might have too recent version of clang which is not supported
by qttools. Don't force qttools to use clang, but let it determine if
the version is suitable.

For 6.8, amend the change with additional check for maximum supported
version and skip clang from oe-core.

Change-Id: I8a141ec01f3556d33b3037ba27adc250b99855b5
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
(cherry picked from commit 4df44780d1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit fb8737c59a)
(cherry picked from commit c7d71f4cec)
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
This commit is contained in:
Samuli Piippo 2025-09-12 04:59:26 +00:00
parent f07382994f
commit 97185add29

View File

@ -24,15 +24,15 @@ SRC_URI += " \
DEPENDS += "qtbase qtdeclarative qttools-native"
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 = "${@True if bb.utils.vercmp_string_op(d.getVar('LLVMVERSION') or '', '17', '>') and \
bb.utils.vercmp_string_op(d.getVar('LLVMVERSION') or '', '21', '<') 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[clang] = "-DFEATURE_clang=ON,-DFEATURE_clang=OFF,clang"
PACKAGECONFIG[clang] = ",-DFEATURE_clang=OFF,clang"
FILES:${PN}-tools += "${QT6_INSTALL_DATADIR}/phrasebooks"