Signed-off-by: Markus Volk <f_...@t-online.de>
---
 meta/recipes-devtools/llvm/llvm_git.bb | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/llvm/llvm_git.bb 
b/meta/recipes-devtools/llvm/llvm_git.bb
index 0d7b042958..f9d124e387 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -112,9 +112,8 @@ do_install() {
         # llvm harcodes usr/lib as install path, so this corrects it to actual 
libdir
         mv -T -n ${D}/${prefix}/lib ${D}/${libdir} || true
 
-        # Remove opt-viewer: https://llvm.org/docs/Remarks.html
-        rm -rf ${D}${datadir}/opt-viewer
-        rmdir ${D}${datadir}
+        # Remove opt-viewer: https://llvm.org/docs/Remarks.html if disabled
+        ${@bb.utils.contains('PACKAGECONFIG', 'optviewer', '', 'rm -rf 
${D}${datadir}', d)}
 
         # reproducibility
         sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
@@ -125,7 +124,7 @@ do_install:class-native() {
        install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV}
 }
 
-PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm 
${PN}-liboptremarks ${PN}-liblto"
+PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm 
${PN}-liboptremarks ${PN}-optviewer ${PN}-liblto"
 
 RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello 
${PN}-liboptremarks"
 
@@ -149,6 +148,10 @@ FILES:${PN}-llvmhello = "\
     ${libdir}/LLVMHello.so \
 "
 
+FILES:${PN}-optviewer += "\
+    ${datadir}/opt-viewer \
+"
+
 FILES:${PN}-dev += " \
     ${libdir}/llvm-config \
     ${libdir}/libRemarks.so \
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167268): 
https://lists.openembedded.org/g/openembedded-core/message/167268
Mute This Topic: https://lists.openembedded.org/mt/91941556/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to