From: Anton Kochkov <anton.kochkov@proton.me>
To: qemu-devel@nongnu.org
Cc: "Anton Kochkov" <anton.kochkov@proton.me>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Alexandre Iooss" <erdnaxe@crans.org>,
"Mahmoud Mandour" <ma.mandourr@gmail.com>
Subject: [PATCH v2 1/2] contrib/plugins: add meson build file
Date: Wed, 28 Jun 2023 16:26:11 +0000 [thread overview]
Message-ID: <20230628162451.147419-2-anton.kochkov@proton.me> (raw)
In-Reply-To: <20230628162451.147419-1-anton.kochkov@proton.me>
Add crossplatform Meson file to build TCG plugins since
the Makefile makes wrong assumptions about it being used only
on Linux. Tested on Linux and macOS.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1710
Signed-off-by: Anton Kochkov <anton.kochkov@proton.me>
---
contrib/plugins/meson.build | 31 +++++++++++++++++++++++++++++++
contrib/plugins/meson_options.txt | 1 +
2 files changed, 32 insertions(+)
create mode 100644 contrib/plugins/meson.build
create mode 100644 contrib/plugins/meson_options.txt
diff --git a/contrib/plugins/meson.build b/contrib/plugins/meson.build
new file mode 100644
index 0000000000..72c4167461
--- /dev/null
+++ b/contrib/plugins/meson.build
@@ -0,0 +1,31 @@
+project('qemu-plugins', 'c', meson_version: '>=0.50.0')
+
+qemu_src = get_option('qemu_path')
+if qemu_src == ''
+ qemu_src = '../..'
+endif
+
+qemu_include = qemu_src + '/include/qemu'
+incdir = include_directories(qemu_include)
+
+plugins = [
+ 'execlog',
+ 'hotblocks',
+ 'hotpages',
+ 'howvec',
+ 'lockstep',
+ 'hwprofile',
+ 'cache',
+ 'drcov',
+]
+
+th = dependency('threads', required: true)
+glib = dependency('glib-2.0', required: true)
+
+foreach p: plugins
+ library(p, p + '.c',
+ include_directories: incdir,
+ dependencies: [th, glib],
+ override_options: ['b_lundef=false']
+ )
+endforeach
diff --git a/contrib/plugins/meson_options.txt b/contrib/plugins/meson_options.txt
new file mode 100644
index 0000000000..2d76cda496
--- /dev/null
+++ b/contrib/plugins/meson_options.txt
@@ -0,0 +1 @@
+option('qemu_path', type : 'string', value : '', description : 'Full path to the QEMU sources to build plugins for')
--
2.41.0
next prev parent reply other threads:[~2023-06-28 16:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 16:25 [PATCH v2 0/2] contrib/plugins: Migrate to the Meson build Anton Kochkov
2023-06-28 16:26 ` Anton Kochkov [this message]
2023-08-02 8:16 ` [PATCH v2 1/2] contrib/plugins: add meson build file Akihiko Odaki
2023-08-02 8:22 ` Akihiko Odaki
2023-06-28 16:26 ` [PATCH v2 2/2] contrib/plugins: remove Makefile Anton Kochkov
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=20230628162451.147419-2-anton.kochkov@proton.me \
--to=anton.kochkov@proton.me \
--cc=alex.bennee@linaro.org \
--cc=erdnaxe@crans.org \
--cc=ma.mandourr@gmail.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).