diff options
author | Ross Burton <ross.burton@arm.com> | 2025-07-21 14:24:23 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-07-21 23:00:18 +0100 |
commit | 56e1ae0ccf8b5e206e0721c4dc22bd1e701966a9 (patch) | |
tree | 8190fb71827fcae199dd4d2cbb4c7441f82c6389 /meta/recipes-devtools/clang/clang_git.bb | |
parent | 208693b05c1032c412f7e4041cadf87a48e04821 (diff) | |
download | poky-56e1ae0ccf8b5e206e0721c4dc22bd1e701966a9.tar.gz |
libclc: split out of clang
Split the libclc subproject out of the clang recipe and into a dedicated
libclc recipe.
This is useful because libclc is the OpenCL runtime library and as such
isn't target-specific and needs a native clang to build, not a target
libllvm.
Verified that nothing is dropped by adding clang and libclc to an image
and verifying that the file list is the same before and after this
change.
We need to patch the libclc CMakeLists to allow it to use an out-of-tree
prepare_builtins binary, discussion is ongoing with upstream to resolve
this properly.
(From OE-Core rev: 33a8742a1280b4c6779a7aa487c2dd4a713babe6)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/clang/clang_git.bb')
-rw-r--r-- | meta/recipes-devtools/clang/clang_git.bb | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/meta/recipes-devtools/clang/clang_git.bb b/meta/recipes-devtools/clang/clang_git.bb index 1210ca92de..a85626c45a 100644 --- a/meta/recipes-devtools/clang/clang_git.bb +++ b/meta/recipes-devtools/clang/clang_git.bb | |||
@@ -131,7 +131,7 @@ HF[vardepvalue] = "${HF}" | |||
131 | 131 | ||
132 | # Ensure that LLVM_PROJECTS does not contain compiler runtime components e.g. libcxx etc | 132 | # Ensure that LLVM_PROJECTS does not contain compiler runtime components e.g. libcxx etc |
133 | # they are enabled via LLVM_ENABLE_RUNTIMES | 133 | # they are enabled via LLVM_ENABLE_RUNTIMES |
134 | LLVM_PROJECTS ?= "clang;clang-tools-extra;libclc;lld" | 134 | LLVM_PROJECTS ?= "clang;clang-tools-extra;lld" |
135 | 135 | ||
136 | # linux hosts (.so) on Windows .pyd | 136 | # linux hosts (.so) on Windows .pyd |
137 | SOLIBSDEV:mingw32 = ".pyd" | 137 | SOLIBSDEV:mingw32 = ".pyd" |
@@ -192,7 +192,7 @@ EXTRA_OECMAKE:append:class-target = "\ | |||
192 | 192 | ||
193 | DEPENDS = "binutils zlib zstd libffi libxml2 libxml2-native ninja-native swig-native spirv-tools-native llvm-tblgen-native" | 193 | DEPENDS = "binutils zlib zstd libffi libxml2 libxml2-native ninja-native swig-native spirv-tools-native llvm-tblgen-native" |
194 | DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_SYS} virtual/nativesdk-cross-binutils nativesdk-python3" | 194 | DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_SYS} virtual/nativesdk-cross-binutils nativesdk-python3" |
195 | DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} python3 ${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', 'compiler-rt libcxx', '', d)} spirv-llvm-translator-native" | 195 | DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} python3 ${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', 'compiler-rt libcxx', '', d)}" |
196 | 196 | ||
197 | RRECOMMENDS:${PN} = "binutils" | 197 | RRECOMMENDS:${PN} = "binutils" |
198 | RRECOMMENDS:${PN}:append:class-target = "${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', ' libcxx-dev', '', d)}" | 198 | RRECOMMENDS:${PN}:append:class-target = "${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', ' libcxx-dev', '', d)}" |
@@ -259,7 +259,6 @@ do_install:append:class-native () { | |||
259 | install -Dm 0755 ${B}${BINPATHPREFIX}/bin/clangd-indexer ${D}${bindir}/clangd-indexer | 259 | install -Dm 0755 ${B}${BINPATHPREFIX}/bin/clangd-indexer ${D}${bindir}/clangd-indexer |
260 | fi | 260 | fi |
261 | install -Dm 0755 ${B}${BINPATHPREFIX}/bin/clang-tidy-confusable-chars-gen ${D}${bindir}/clang-tidy-confusable-chars-gen | 261 | install -Dm 0755 ${B}${BINPATHPREFIX}/bin/clang-tidy-confusable-chars-gen ${D}${bindir}/clang-tidy-confusable-chars-gen |
262 | install -Dm 0755 ${B}${BINPATHPREFIX}/bin/prepare_builtins ${D}${bindir}/prepare_builtins | ||
263 | 262 | ||
264 | for f in `find ${D}${bindir} -executable -type f -not -type l`; do | 263 | for f in `find ${D}${bindir} -executable -type f -not -type l`; do |
265 | test -n "`file -b $f|grep -i ELF`" && ${STRIP} $f | 264 | test -n "`file -b $f|grep -i ELF`" && ${STRIP} $f |
@@ -295,11 +294,11 @@ do_install:append:class-nativesdk () { | |||
295 | fi | 294 | fi |
296 | } | 295 | } |
297 | 296 | ||
298 | PROVIDES:append:class-native = " llvm-native libclc-native" | 297 | PROVIDES:append:class-native = " llvm-native" |
299 | PROVIDES:append:class-target = " llvm libclc" | 298 | PROVIDES:append:class-target = " llvm" |
300 | PROVIDES:append:class-nativesdk = " nativesdk-llvm nativesdk-libclc" | 299 | PROVIDES:append:class-nativesdk = " nativesdk-llvm" |
301 | 300 | ||
302 | PACKAGES =+ "${PN}-libllvm ${PN}-libclang-python ${PN}-libclang-cpp ${PN}-tidy ${PN}-format ${PN}-tools ${PN}-clc \ | 301 | PACKAGES =+ "${PN}-libllvm ${PN}-libclang-python ${PN}-libclang-cpp ${PN}-tidy ${PN}-format ${PN}-tools \ |
303 | libclang llvm-linker-tools" | 302 | libclang llvm-linker-tools" |
304 | 303 | ||
305 | BBCLASSEXTEND = "native nativesdk" | 304 | BBCLASSEXTEND = "native nativesdk" |
@@ -316,8 +315,6 @@ RDEPENDS:${PN}-tools += "\ | |||
316 | perl-module-term-ansicolor \ | 315 | perl-module-term-ansicolor \ |
317 | " | 316 | " |
318 | 317 | ||
319 | RPROVIDES:${PN}-clc = "${MLPREFIX}libclc" | ||
320 | |||
321 | RRECOMMENDS:${PN}-tidy += "${PN}-tools" | 318 | RRECOMMENDS:${PN}-tidy += "${PN}-tools" |
322 | 319 | ||
323 | FILES:llvm-linker-tools = "${libdir}/LLVMgold* ${libdir}/libLTO.so.* ${libdir}/LLVMPolly*" | 320 | FILES:llvm-linker-tools = "${libdir}/LLVMgold* ${libdir}/libLTO.so.* ${libdir}/LLVMPolly*" |
@@ -384,8 +381,6 @@ FILES:${PN} += "\ | |||
384 | ${nonarch_libdir}/${BPN}/*/include/ \ | 381 | ${nonarch_libdir}/${BPN}/*/include/ \ |
385 | " | 382 | " |
386 | 383 | ||
387 | FILES:${PN}-clc += "${datadir}/clc" | ||
388 | |||
389 | FILES:${PN}-libllvm =+ "\ | 384 | FILES:${PN}-libllvm =+ "\ |
390 | ${libdir}/libLLVM.so.${MAJOR_VER}.${MINOR_VER} \ | 385 | ${libdir}/libLLVM.so.${MAJOR_VER}.${MINOR_VER} \ |
391 | ${libdir}/libLLVM-${MAJOR_VER}.so \ | 386 | ${libdir}/libLLVM-${MAJOR_VER}.so \ |