summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaixiao Yan <haixiao.yan.cn@windriver.com>2025-07-05 08:52:25 +0800
committerKhem Raj <raj.khem@gmail.com>2025-07-06 22:06:15 -0700
commitac0ac304e34449360fb35c26684dea0e747e23f7 (patch)
tree347377718262ea25085562d87d679e74767ce72d
parent0a9c47ba49db81bb68ca4d0b60249694a4c63914 (diff)
downloadmeta-clang-ac0ac304e34449360fb35c26684dea0e747e23f7.tar.gz
Revert "clang: Do not provide llvm-native implicitly"
This reverts commit 384e8d169a2c408e2cef03ea2deb88fb82058011. The original commit removed the implicit PROVIDES declarations for llvm, llvm-native, and nativesdk-llvm from the clang recipe. However, this change breaks builds in kirkstone-clang18 environments, where mesa and lib32-llvm expect these to be provided by clang: - Mesa fails due to missing providers for llvm18.1.6 and nativesdk-llvm18.1.6. - lib32-llvm 13.0.1 fails on ARM BSPs with the following error, falling back to the core layer's outdated LLVM: error: 'RegVT' was not declared in this scope This commit was backported from scarthgap, but it is incompatible with oe-core expectations in the kirkstone branch. Reverting it restores compatibility. Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
-rw-r--r--README.md14
-rw-r--r--conf/layer.conf3
-rw-r--r--recipes-devtools/clang/clang_git.bb3
3 files changed, 6 insertions, 14 deletions
diff --git a/README.md b/README.md
index 599237c..3683fe5 100644
--- a/README.md
+++ b/README.md
@@ -57,20 +57,6 @@ TOOLCHAIN = "clang"
57also look at `conf/nonclangable.conf` for list of recipes which do not yet fully 57also look at `conf/nonclangable.conf` for list of recipes which do not yet fully
58build with clang. 58build with clang.
59 59
60# Providing LLVM
61
62clang recipes can provide llvm and related packages too, it might be worth using single
63provider for llvm and clang to save some compile time and space, select the knobs
64to point to clang, default is to use the version provided by core layer.
65
66```shell
67PREFERRED_PROVIDER_llvm = "clang"
68PREFERRED_PROVIDER_llvm-native = "clang-native"
69PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang"
70PROVIDES:pn-clang = "llvm"
71PROVIDES:pn-clang-native = "llvm-native"
72PROVIDES:pn-nativesdk-clang = "nativesdk-llvm"
73```
74# Default Compiler Runtime 60# Default Compiler Runtime
75 61
76Default is to use GNU runtime `TC_CXX_RUNTIME = "gnu"` which consists of libgcc, libstdc++ to provide C/C++ 62Default is to use GNU runtime `TC_CXX_RUNTIME = "gnu"` which consists of libgcc, libstdc++ to provide C/C++
diff --git a/conf/layer.conf b/conf/layer.conf
index 3cf7fc3..0e2caec 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -27,6 +27,9 @@ BBFILES_DYNAMIC += " \
27 27
28PREFERRED_PROVIDER_libgcc-initial = "libgcc-initial" 28PREFERRED_PROVIDER_libgcc-initial = "libgcc-initial"
29#PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs_forcevariable = "libcxx" 29#PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs_forcevariable = "libcxx"
30PREFERRED_PROVIDER_llvm = "clang"
31PREFERRED_PROVIDER_llvm-native = "clang-native"
32PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang"
30PREFERRED_PROVIDER_libunwind = "${@bb.utils.contains_any("TC_CXX_RUNTIME", "llvm android", "libcxx", "libunwind", d)}" 33PREFERRED_PROVIDER_libunwind = "${@bb.utils.contains_any("TC_CXX_RUNTIME", "llvm android", "libcxx", "libunwind", d)}"
31INHERIT += "clang" 34INHERIT += "clang"
32 35
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb
index cf4456c..096b11a 100644
--- a/recipes-devtools/clang/clang_git.bb
+++ b/recipes-devtools/clang/clang_git.bb
@@ -287,6 +287,9 @@ do_install:append:class-nativesdk () {
287PACKAGES =+ "${PN}-libllvm ${PN}-lldb-python ${PN}-libclang-cpp ${PN}-tidy ${PN}-format ${PN}-tools \ 287PACKAGES =+ "${PN}-libllvm ${PN}-lldb-python ${PN}-libclang-cpp ${PN}-tidy ${PN}-format ${PN}-tools \
288 libclang lldb lldb-server liblldb llvm-linker-tools" 288 libclang lldb lldb-server liblldb llvm-linker-tools"
289 289
290PROVIDES += "llvm llvm${PV}"
291PROVIDES:append:class-native = " llvm-native"
292
290BBCLASSEXTEND = "native nativesdk" 293BBCLASSEXTEND = "native nativesdk"
291 294
292RDEPENDS:lldb += "${PN}-lldb-python lldb-server" 295RDEPENDS:lldb += "${PN}-lldb-python lldb-server"