From 523198bd99caf1110d8ba6d7662160bab7e8d749 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 9 Jun 2023 00:05:45 -0700 Subject: clang.bbclass: Check for INHIBIT_DEFAULT_DEPS in creating ld->lld symlink When INHIBIT_DEFAULT_DEPS = "1" then the toolchain is not staged in Recipe specific native sysroot at all, therefore there is no point of creating the symlink Moreover it also fixes build of such recipes when ld-is-lld is set at distro level Signed-off-by: Khem Raj --- classes/clang.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/clang.bbclass b/classes/clang.bbclass index 88afc14..9aab4eb 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -142,7 +142,8 @@ RECIPESYSROOTFUNCS = "" RECIPESYSROOTFUNCS:toolchain-clang = "recipe_sysroot_check_ld_is_lld" recipe_sysroot_check_ld_is_lld () { - if "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', 'true', 'false', d)}"; then + if ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', 'true', 'false', d)} && \ + ${@bb.utils.contains('INHIBIT_DEFAULT_DEPS', '1', 'false', 'true', d)}; then ln -srf ${RECIPE_SYSROOT_NATIVE}${bindir}/${TARGET_SYS}/${TARGET_PREFIX}ld.lld ${RECIPE_SYSROOT_NATIVE}${bindir}/${TARGET_SYS}/${TARGET_PREFIX}ld fi } -- cgit v1.2.3-54-g00ecf