From aae6ebe90f531b6a194a2e00e78f4a5cc699f8aa Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 27 Sep 2021 21:20:49 -0700 Subject: nativesdk-clang: Fix build when using RUNTIME = llvm We can not use nativesdk variants of libcxx and compiler-rt yet when compiling nativesdk-clang because, it will need this compiler to build them, so solve this catch-22, since we do not use the runtime built during compiler builds, use libgcc/libstdc++ to pass cmake tests during configure, this should be fine as it will be not needed for final builds where nativesdk-clang will be used, it can still default to llvm runtime on SDK host Signed-off-by: Khem Raj (cherry picked from commit 826f7287ffb8ae87bd843ecfe4a21a661bb03294) --- classes/clang.bbclass | 1 + recipes-devtools/clang/clang_git.bb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/classes/clang.bbclass b/classes/clang.bbclass index b9d045c..d2340aa 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass @@ -110,6 +110,7 @@ def clang_base_deps(d): BASE_DEFAULT_DEPS:toolchain-clang:class-target = "${@clang_base_deps(d)}" BASE_DEFAULT_DEPS:append:class-native:toolchain-clang:runtime-llvm = " libcxx-native compiler-rt-native" +BASE_DEFAULT_DEPS:append:class-nativesdk:toolchain-clang:runtime-llvm = " clang-native nativesdk-libcxx nativesdk-compiler-rt" cmake_do_generate_toolchain_file:append:toolchain-clang () { cat >> ${WORKDIR}/toolchain.cmake <