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 <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2025-04-23 14:00:25 +02:00
parent 31b7c5e051
commit 8b8788d68e
1 changed files with 10 additions and 0 deletions

View File

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