summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/llvm/llvm_git.bb14
1 files changed, 9 insertions, 5 deletions
diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index b4e983d2d0..f133653903 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -57,9 +57,11 @@ def get_llvm_arch(bb, d, arch_var):
57def get_llvm_host_arch(bb, d): 57def get_llvm_host_arch(bb, d):
58 return get_llvm_arch(bb, d, 'HOST_ARCH') 58 return get_llvm_arch(bb, d, 'HOST_ARCH')
59 59
60PACKAGECONFIG ??= "" 60PACKAGECONFIG ??= "libllvm"
61PACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libllvm', '', d)}"
61# if optviewer OFF, force the modules to be not found or the ones on the host would be found 62# if optviewer OFF, force the modules to be not found or the ones on the host would be found
62PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml" 63PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml"
64PACKAGECONFIG[libllvm] = ""
63 65
64# 66#
65# Default to build all OE-Core supported target arches (user overridable). 67# Default to build all OE-Core supported target arches (user overridable).
@@ -102,14 +104,15 @@ do_compile:prepend:class-target() {
102} 104}
103 105
104do_compile() { 106do_compile() {
107 if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; then
105 ninja -v ${PARALLEL_MAKE} 108 ninja -v ${PARALLEL_MAKE}
106} 109 else
107
108do_compile:class-native() {
109 ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen 110 ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
111 fi
110} 112}
111 113
112do_install() { 114do_install() {
115 if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; then
113 DESTDIR=${D} ninja -v install 116 DESTDIR=${D} ninja -v install
114 117
115 # llvm harcodes usr/lib as install path, so this corrects it to actual libdir 118 # llvm harcodes usr/lib as install path, so this corrects it to actual libdir
@@ -121,9 +124,10 @@ do_install() {
121 124
122 # reproducibility 125 # reproducibility
123 sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake 126 sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
127 fi
124} 128}
125 129
126do_install:class-native() { 130do_install:append:class-native() {
127 install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV} 131 install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV}
128 install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV} 132 install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV}
129 ln -sf llvm-config${PV} ${D}${bindir}/llvm-config 133 ln -sf llvm-config${PV} ${D}${bindir}/llvm-config