summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-05-23 22:49:03 -0700
committerKhem Raj <raj.khem@gmail.com>2023-05-26 13:28:53 -0700
commit384e8d169a2c408e2cef03ea2deb88fb82058011 (patch)
treeeedc5b9072e961a814ffadd438d95f9067bf41de
parentd9585f0acaec960b69ce1e7931894eb312abfddd (diff)
downloadmeta-clang-384e8d169a2c408e2cef03ea2deb88fb82058011.tar.gz
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 <raj.khem@gmail.com>
-rw-r--r--README.md14
-rw-r--r--conf/layer.conf3
-rw-r--r--recipes-devtools/clang/clang_git.bb3
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"
51also look at `conf/nonclangable.conf` for list of recipes which do not yet fully 51also look at `conf/nonclangable.conf` for list of recipes which do not yet fully
52build with clang. 52build with clang.
53 53
54# Providing LLVM
55
56clang recipes can provide llvm and related packages too, it might be worth using single
57provider for llvm and clang to save some compile time and space, select the knobs
58to point to clang, default is to use the version provided by core layer.
59
60```shell
61PREFERRED_PROVIDER_llvm = "clang"
62PREFERRED_PROVIDER_llvm-native = "clang-native"
63PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang"
64PROVIDES:pn-clang = "llvm"
65PROVIDES:pn-clang-native = "llvm-native"
66PROVIDES:pn-nativesdk-clang = "nativesdk-llvm"
67```
54# Default Compiler Runtime 68# Default Compiler Runtime
55 69
56Default is to use GNU runtime `RUNTIME = "gnu"` which consists of libgcc, libstdc++ to provide C/C++ 70Default 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 += " \
23 23
24PREFERRED_PROVIDER_libgcc-initial = "libgcc-initial" 24PREFERRED_PROVIDER_libgcc-initial = "libgcc-initial"
25#PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs_forcevariable = "libcxx" 25#PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs_forcevariable = "libcxx"
26PREFERRED_PROVIDER_llvm = "clang"
27PREFERRED_PROVIDER_llvm-native = "clang-native"
28PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang"
29PREFERRED_PROVIDER_libunwind = "${@bb.utils.contains_any("RUNTIME", "llvm android", "libcxx", "libunwind", d)}" 26PREFERRED_PROVIDER_libunwind = "${@bb.utils.contains_any("RUNTIME", "llvm android", "libcxx", "libunwind", d)}"
30INHERIT += "clang" 27INHERIT += "clang"
31 28
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 () {
281PACKAGES =+ "${PN}-libllvm ${PN}-lldb-python ${PN}-libclang-cpp ${PN}-tidy ${PN}-format ${PN}-tools \ 281PACKAGES =+ "${PN}-libllvm ${PN}-lldb-python ${PN}-libclang-cpp ${PN}-tidy ${PN}-format ${PN}-tools \
282 libclang lldb lldb-server liblldb llvm-linker-tools" 282 libclang lldb lldb-server liblldb llvm-linker-tools"
283 283
284PROVIDES += "llvm llvm${PV}"
285PROVIDES:append:class-native = " llvm-native"
286
287BBCLASSEXTEND = "native nativesdk" 284BBCLASSEXTEND = "native nativesdk"
288 285
289RDEPENDS:lldb += "${PN}-lldb-python lldb-server" 286RDEPENDS:lldb += "${PN}-lldb-python lldb-server"