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