Openembedded Core Discussions
 help / color / mirror / Atom feed
From: fdk17 <fdk17@ftml.net>
To: openembedded-core@lists.openembedded.org
Subject: [meson][PATCH] meson: Allow for llvm-native tools to be used
Date: Wed, 25 Dec 2019 06:49:11 -0500	[thread overview]
Message-ID: <1758bd87-e492-46bc-8aaa-514e802c5030@www.fastmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]

I created a bbappend to build the LLVM recipe so that all the libraries were available for use on the host.
These libraries are then used by a host/sdk tool to prepare binary files for use by an application on the target.
When building our tool using meson it wasn't able to find the Yocto built LLLVM libraries.
This fixes the issue so meson uses the correct llvm-config tool.

Author: Fred Baksik <fred.baksik@mrcy.com>
Date: Tue Dec 24 20:38:47 2019 -0500

 meson: Allow for llvm-native tools to be used

 Signed-off-by: Fred Baksik <fred.baksik@mrcy.com>

diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index e1a13bbbf7..b5cd2ee8c4 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -33,6 +33,7 @@ EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}"
 MESON_CROSS_FILE = ""
 MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
 MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
+MESON_CROSS_FILE_class-native = "--native-file ${WORKDIR}/meson.native"

 def meson_array(var, d):
 items = d.getVar(var).split()
@@ -110,6 +111,14 @@ endian = '${@meson_endian('TARGET', d)}'
 EOF
 }

+do_write_config_class-native() {
+ # This needs to be Py to split the args into single-element lists
+ cat >${WORKDIR}/meson.native <<EOF
+[binaries]
+llvm-config = 'llvm-config${LLVMVERSION}'
+EOF
+}
+
 CONFIGURE_FILES = "meson.build"

 meson_do_configure() {

[-- Attachment #2: Type: text/html, Size: 2407 bytes --]

             reply	other threads:[~2019-12-25 11:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-25 11:49 fdk17 [this message]
2019-12-25 12:02 ` ✗ patchtest: failure for meson: Allow for llvm-native tools to be used Patchwork
2019-12-27 12:03 ` [meson][PATCH] " Peter Kjellerstedt
2019-12-27 14:25   ` fdk17
2019-12-27 14:30     ` Fred Baksik
2020-01-02 17:28   ` Ross Burton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1758bd87-e492-46bc-8aaa-514e802c5030@www.fastmail.com \
    --to=fdk17@ftml.net \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox