From 384e8d169a2c408e2cef03ea2deb88fb82058011 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 23 May 2023 22:49:03 -0700 Subject: clang: Do not provide llvm-native implicitly Document a way to let clang provide llvm as well. This helps this layer pass the yocto check layer test Signed-off-by: Khem Raj --- README.md | 14 ++++++++++++++ conf/layer.conf | 3 --- recipes-devtools/clang/clang_git.bb | 3 --- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ca2984a..ba92408 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,20 @@ TOOLCHAIN = "clang" also look at `conf/nonclangable.conf` for list of recipes which do not yet fully build with clang. +# Providing LLVM + +clang recipes can provide llvm and related packages too, it might be worth using single +provider for llvm and clang to save some compile time and space, select the knobs +to point to clang, default is to use the version provided by core layer. + +```shell +PREFERRED_PROVIDER_llvm = "clang" +PREFERRED_PROVIDER_llvm-native = "clang-native" +PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang" +PROVIDES:pn-clang = "llvm" +PROVIDES:pn-clang-native = "llvm-native" +PROVIDES:pn-nativesdk-clang = "nativesdk-llvm" +``` # Default Compiler Runtime Default is to use GNU runtime `RUNTIME = "gnu"` which consists of libgcc, libstdc++ to provide C/C++ diff --git a/conf/layer.conf b/conf/layer.conf index f846833..0fbb12f 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -23,9 +23,6 @@ BBFILES_DYNAMIC += " \ PREFERRED_PROVIDER_libgcc-initial = "libgcc-initial" #PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs_forcevariable = "libcxx" -PREFERRED_PROVIDER_llvm = "clang" -PREFERRED_PROVIDER_llvm-native = "clang-native" -PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang" PREFERRED_PROVIDER_libunwind = "${@bb.utils.contains_any("RUNTIME", "llvm android", "libcxx", "libunwind", d)}" INHERIT += "clang" diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 15ba27c..654fa49 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb @@ -281,9 +281,6 @@ do_install:append:class-nativesdk () { PACKAGES =+ "${PN}-libllvm ${PN}-lldb-python ${PN}-libclang-cpp ${PN}-tidy ${PN}-format ${PN}-tools \ libclang lldb lldb-server liblldb llvm-linker-tools" -PROVIDES += "llvm llvm${PV}" -PROVIDES:append:class-native = " llvm-native" - BBCLASSEXTEND = "native nativesdk" RDEPENDS:lldb += "${PN}-lldb-python lldb-server" -- cgit v1.2.3-54-g00ecf