summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/llvm
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-08-01 06:55:30 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-09 09:24:16 +0100
commita479bdd4fbe5a3090739b720aac319cb795b277d (patch)
treecf85b754a5c943b85e2ba5431f88869af045b818 /meta/recipes-devtools/llvm
parent3adf66fc4bf56bf92c4acb199a18a8db3a1ccc2a (diff)
downloadpoky-a479bdd4fbe5a3090739b720aac319cb795b277d.tar.gz
mesa, llvm: Use native version of llvm-config
We have a variable YOCTO_ALTERNATE_EXE_PATH to point to target sysroot, utilize this in mesa to use native version of llvm-config to report values from target sysroot. (From OE-Core rev: 1c4444f7b2f5cbcaaf6f9d21d7b4f86555ed746a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/llvm')
-rw-r--r--meta/recipes-devtools/llvm/llvm_git.bb16
1 files changed, 9 insertions, 7 deletions
diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index 5dcb508c23..722bc53aa1 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -67,12 +67,12 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
67 67
68EXTRA_OECMAKE_append_class-target = "\ 68EXTRA_OECMAKE_append_class-target = "\
69 -DCMAKE_CROSSCOMPILING:BOOL=ON \ 69 -DCMAKE_CROSSCOMPILING:BOOL=ON \
70 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ 70 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \
71 " 71 "
72 72
73EXTRA_OECMAKE_append_class-nativesdk = "\ 73EXTRA_OECMAKE_append_class-nativesdk = "\
74 -DCMAKE_CROSSCOMPILING:BOOL=ON \ 74 -DCMAKE_CROSSCOMPILING:BOOL=ON \
75 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ 75 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \
76 " 76 "
77 77
78do_configure_prepend() { 78do_configure_prepend() {
@@ -87,12 +87,12 @@ do_compile() {
87} 87}
88 88
89do_compile_class-native() { 89do_compile_class-native() {
90 NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} llvm-tblgen 90 NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
91} 91}
92 92
93do_install() { 93do_install() {
94 NINJA_STATUS="[%p] " DESTDIR=${LLVM_INSTALL_DIR} ninja -v install 94 NINJA_STATUS="[%p] " DESTDIR=${LLVM_INSTALL_DIR} ninja -v install
95 install -D -m 0755 ${B}/NATIVE/bin/llvm-config ${D}${libdir}/${LLVM_DIR}/llvm-config-host 95 install -D -m 0755 ${B}/bin/llvm-config ${D}${libdir}/${LLVM_DIR}/llvm-config
96 96
97 install -d ${D}${bindir}/${LLVM_DIR} 97 install -d ${D}${bindir}/${LLVM_DIR}
98 cp -r ${LLVM_INSTALL_DIR}${bindir}/* ${D}${bindir}/${LLVM_DIR}/ 98 cp -r ${LLVM_INSTALL_DIR}${bindir}/* ${D}${bindir}/${LLVM_DIR}/
@@ -121,7 +121,9 @@ do_install() {
121 rm -rf ${D}${libdir}/${LLVM_DIR}/libLTO.so 121 rm -rf ${D}${libdir}/${LLVM_DIR}/libLTO.so
122} 122}
123do_install_class-native() { 123do_install_class-native() {
124 install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen 124 install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV}
125 install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV}
126 install -D -m 0755 ${B}/lib/libLLVM-${PV}.so ${D}${libdir}/libLLVM-${PV}.so
125} 127}
126 128
127PACKAGES += "${PN}-bugpointpasses ${PN}-llvmhello" 129PACKAGES += "${PN}-bugpointpasses ${PN}-llvmhello"
@@ -134,14 +136,14 @@ FILES_${PN}-dbg = " \
134 ${libdir}/${LLVM_DIR}/.debug/BugpointPasses.so \ 136 ${libdir}/${LLVM_DIR}/.debug/BugpointPasses.so \
135 ${libdir}/${LLVM_DIR}/.debug/LLVMHello.so \ 137 ${libdir}/${LLVM_DIR}/.debug/LLVMHello.so \
136 ${libdir}/${LLVM_DIR}/.debug/libLTO.so* \ 138 ${libdir}/${LLVM_DIR}/.debug/libLTO.so* \
137 ${libdir}/${LLVM_DIR}/.debug/llvm-config-host \ 139 ${libdir}/${LLVM_DIR}/.debug/llvm-config \
138 /usr/src/debug \ 140 /usr/src/debug \
139" 141"
140 142
141FILES_${PN}-dev = " \ 143FILES_${PN}-dev = " \
142 ${bindir}/${LLVM_DIR} \ 144 ${bindir}/${LLVM_DIR} \
143 ${includedir}/${LLVM_DIR} \ 145 ${includedir}/${LLVM_DIR} \
144 ${libdir}/${LLVM_DIR}/llvm-config-host \ 146 ${libdir}/${LLVM_DIR}/llvm-config \
145" 147"
146 148
147RRECOMMENDS_${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello" 149RRECOMMENDS_${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello"