<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>I created a bbappend to build the LLVM recipe so that all the libraries were available for use on the host.<br></div><div>These libraries are then used by a host/sdk tool to prepare binary files for use by an application on the target.<br></div><div>When building our tool using meson it wasn't able to find the Yocto built LLLVM libraries.<br></div><div>This fixes the issue so meson uses the correct llvm-config tool.<br></div><div><br></div><div>Author: Fred Baksik <<a href="mailto:fred.baksik@mrcy.com">fred.baksik@mrcy.com</a>><br></div><div>Date: Tue Dec 24 20:38:47 2019 -0500<br></div><div><br></div><div> meson: Allow for llvm-native tools to be used<br></div><div> <br></div><div> Signed-off-by: Fred Baksik <<a href="mailto:fred.baksik@mrcy.com">fred.baksik@mrcy.com</a>><br></div><div><br></div><div>diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass<br></div><div>index e1a13bbbf7..b5cd2ee8c4 100644<br></div><div>--- a/meta/classes/meson.bbclass<br></div><div>+++ b/meta/classes/meson.bbclass<br></div><div>@@ -33,6 +33,7 @@ EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}"<br></div><div> MESON_CROSS_FILE = ""<br></div><div> MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"<br></div><div> MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"<br></div><div>+MESON_CROSS_FILE_class-native = "--native-file ${WORKDIR}/meson.native"<br></div><div> <br></div><div> def meson_array(var, d):<br></div><div> items = d.getVar(var).split()<br></div><div>@@ -110,6 +111,14 @@ endian = '${@meson_endian('TARGET', d)}'<br></div><div> EOF<br></div><div> }<br></div><div> <br></div><div>+do_write_config_class-native() {<br></div><div>+ # This needs to be Py to split the args into single-element lists<br></div><div>+ cat >${WORKDIR}/meson.native <<EOF<br></div><div>+[binaries]<br></div><div>+llvm-config = 'llvm-config${LLVMVERSION}'<br></div><div>+EOF<br></div><div>+}<br></div><div>+<br></div><div> CONFIGURE_FILES = "meson.build"<br></div><div> <br></div><div> meson_do_configure() {<br></div></body></html>