From e8cf73dca69b55707bed62932f50cd89c3e587b6 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 4 Nov 2024 13:16:30 +0000 Subject: [PATCH] qttools: check available clang version qttools required at least clang 17. Don't try to enable the support unless suitable version is available. meta-clang defines LLVMVERSION global variable with the version number. Pick-to: 6.8 Change-Id: I9df38bb475391a177daa8fde349718529f4350e5 Reviewed-by: Ari Parkkila --- recipes-qt/qt6/qttools_git.bb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes-qt/qt6/qttools_git.bb b/recipes-qt/qt6/qttools_git.bb index 5dc7282..34e5d41 100644 --- a/recipes-qt/qt6/qttools_git.bb +++ b/recipes-qt/qt6/qttools_git.bb @@ -26,9 +26,10 @@ SRC_URI += " \ DEPENDS += "qtbase qtdeclarative qttools-native" -PACKAGECONFIG:class-native = "${@bb.utils.contains('BBFILE_COLLECTIONS', 'clang-layer', 'clang', '', d)}" -PACKAGECONFIG:class-nativesdk = "${@bb.utils.contains('BBFILE_COLLECTIONS', 'clang-layer', 'clang', '', d)}" -PACKAGECONFIG:remove:mingw32 = "clang" +QTTOOLS_USE_CLANG ?= "${@ 'clang' if bb.utils.vercmp_string_op(d.getVar('LLVMVERSION') or '', '17', '>') 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"