summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>2025-04-03 20:02:07 +0300
committerKhem Raj <raj.khem@gmail.com>2025-04-11 08:18:01 -0700
commit18d270b25e6fc86c2125d7acfe356aca1f8ea4c0 (patch)
tree075cf4db3b04a9dc87955ec2b0593b22fc403cc8
parentc67044715086459b391d25e7e62cf19a9484d08d (diff)
downloadmeta-clang-18d270b25e6fc86c2125d7acfe356aca1f8ea4c0.tar.gz
clang: remove LLVM files from sysroot if clang is not providing it
Upcoming Mesa patches for OE-Core pull both LLVM and Clang into the sysroot if meta-clang is being used. Now as libLLVM.so in OE-Core is compatible with the one being built by Clang, remove LLVM artifacts from the native sysroot if clang recipe is not selected as LLVM provider. The spirv-llvm-translator recipe is changed to also DEPEND on llvm in order to pull the library into the chroot. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
-rw-r--r--recipes-devtools/clang/clang_git.bb14
-rw-r--r--recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb2
2 files changed, 15 insertions, 1 deletions
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb
index 7ba1a11..dbc5fc5 100644
--- a/recipes-devtools/clang/clang_git.bb
+++ b/recipes-devtools/clang/clang_git.bb
@@ -289,6 +289,20 @@ do_install:append:class-native () {
289 ln -sf clang-tblgen ${D}${bindir}/clang-tblgen${PV} 289 ln -sf clang-tblgen ${D}${bindir}/clang-tblgen${PV}
290 ln -sf llvm-tblgen ${D}${bindir}/llvm-tblgen${PV} 290 ln -sf llvm-tblgen ${D}${bindir}/llvm-tblgen${PV}
291 ln -sf llvm-config ${D}${bindir}/llvm-config${PV} 291 ln -sf llvm-config ${D}${bindir}/llvm-config${PV}
292
293 if ${@ 'false' if 'llvm' in d.getVar('PROVIDES') or '' else 'true' } ; then
294 for f in bugpoint dsymutil llc lli opt reduce-chunk-list sancov sanstats verify-uselistorder ; do
295 rm -f ${D}${bindir}/$f
296 done
297 rm -f ${D}${bindir}/llvm-*
298
299 rm -rf ${D}${includedir}/llvm
300 rm -rf ${D}${includedir}/llvm-c
301 rm -rf ${D}${libdir}/cmake/llvm
302 rm -rf ${D}${libdir}/libLLVM*
303 rm -rf ${D}${libdir}/libLTO*
304 rm -rf ${D}${libdir}/libRemarks*
305 fi
292} 306}
293 307
294do_install:append:class-nativesdk () { 308do_install:append:class-nativesdk () {
diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb
index c566f43..f6a5f64 100644
--- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb
+++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb
@@ -14,7 +14,7 @@ SRCREV_FORMAT = "default_headers"
14 14
15S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
16 16
17DEPENDS = "spirv-tools clang" 17DEPENDS = "spirv-tools clang llvm"
18 18
19inherit cmake pkgconfig python3native 19inherit cmake pkgconfig python3native
20 20