From 8b8788d68e685f0de49f967b40d9afc875bbe57f Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 23 Apr 2025 14:00:25 +0200 Subject: [PATCH] qt6: qttools: remove spurious clang dependency in dey-toolchain SDK Typically, recipes that support clang builds only pull in the required clang dependencies when the TOOLCHAIN variable is expliciltly set to "clang". The qttools recipe in meta-qt6 differs from this by adding the dependency as soon as meta-clang is present in the bblayers, regardless of the selected toolchain. This causes all of the nativesdk clang packages to get included in our SDK (along with the gcc ones), causing SDK bloat and spurious build errors on build machines with limited resources. Make sure that the dependency is only added when the clang TOOLCHAIN is explicitly selected. Signed-off-by: Gabriel Valcazar --- .../qt6-layer/recipes-qt/qt6/qttools_git.bbappend | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 meta-digi-dey/dynamic-layers/qt6-layer/recipes-qt/qt6/qttools_git.bbappend diff --git a/meta-digi-dey/dynamic-layers/qt6-layer/recipes-qt/qt6/qttools_git.bbappend b/meta-digi-dey/dynamic-layers/qt6-layer/recipes-qt/qt6/qttools_git.bbappend new file mode 100644 index 000000000..3a59ef059 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/qt6-layer/recipes-qt/qt6/qttools_git.bbappend @@ -0,0 +1,10 @@ +# Copyright (C) 2025, Digi International Inc. + +# The native and nativesdk versions of this recipe automatically pull in a +# clang dependency as soon as meta-clang is included in the bblayers. Change +# this so that the dependency only gets added when explicitly setting TOOLCHAIN +# to clang. +QTTOOLS_USE_CLANG = "" + +# This check is copied as-is from meta-qt6 +QTTOOLS_USE_CLANG:toolchain-clang = "${@ 'clang' if bb.utils.vercmp_string_op(d.getVar('LLVMVERSION') or '', '17', '>') else ''}"