From e75b2dee39fc0a35f764caa6b72af2a0b9beb165 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 6 Jun 2025 14:46:00 +0100 Subject: [PATCH] compiler-rt/libcxx: Use clang as compiler Signed-off-by: Richard Purdie --- meta/recipes-devtools/clang/compiler-rt-sanitizers_git.bb | 2 ++ meta/recipes-devtools/clang/compiler-rt_git.bb | 2 ++ meta/recipes-devtools/clang/libcxx_git.bb | 2 ++ 3 files changed, 6 insertions(+) diff --git a/meta/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/meta/recipes-devtools/clang/compiler-rt-sanitizers_git.bb index f8e7bb13d2b..47438014b23 100644 --- a/meta/recipes-devtools/clang/compiler-rt-sanitizers_git.bb +++ b/meta/recipes-devtools/clang/compiler-rt-sanitizers_git.bb @@ -36,6 +36,8 @@ BUILD_CXX = "${CCACHE}${HOST_PREFIX}clang++ ${BUILD_CC_ARCH}$" CFLAGS += "${COMPILER_RT}" CXXFLAGS += "${COMPILER_RT} ${LIBCPLUSPLUS}" +TOOLCHAIN = "clang" + DEPENDS += "ninja-native virtual/crypt compiler-rt" DEPENDS:append:class-native = " clang-native libxcrypt-native libcxx-native" DEPENDS:append:class-nativesdk = " virtual/cross-c++ clang-native clang-crosssdk-${SDK_SYS} nativesdk-libxcrypt nativesdk-gcc-runtime" diff --git a/meta/recipes-devtools/clang/compiler-rt_git.bb b/meta/recipes-devtools/clang/compiler-rt_git.bb index ad145f86446..7b442183efc 100644 --- a/meta/recipes-devtools/clang/compiler-rt_git.bb +++ b/meta/recipes-devtools/clang/compiler-rt_git.bb @@ -58,6 +58,8 @@ BUILD_CXX = "${CCACHE}clang++ ${BUILD_CC_ARCH}" LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}" CXXFLAGS += "${LIBCPLUSPLUS}" +TOOLCHAIN = "clang" + def get_compiler_rt_arch(bb, d): if bb.utils.contains('TUNE_FEATURES', 'armv5 thumb dsp', True, False, d): return 'armv5te' diff --git a/meta/recipes-devtools/clang/libcxx_git.bb b/meta/recipes-devtools/clang/libcxx_git.bb index c99617c228a..f5bf17f30ae 100644 --- a/meta/recipes-devtools/clang/libcxx_git.bb +++ b/meta/recipes-devtools/clang/libcxx_git.bb @@ -54,6 +54,8 @@ BUILD_CXX = "${CCACHE}clang++ ${BUILD_CC_ARCH}" LDFLAGS += "${COMPILER_RT} ${UNWINDLIB} ${LIBCPLUSPLUS}" CXXFLAGS += "${LIBCPLUSPLUS}" +TOOLCHAIN = "clang" + OECMAKE_SOURCEPATH = "${S}/llvm" EXTRA_OECMAKE += "\ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -- 2.47.3