From: "Alex Bennée" <alex.bennee@linaro.org>
To: Anton Kochkov <anton.kochkov@proton.me>
Cc: qemu-devel@nongnu.org, Alexandre Iooss <erdnaxe@crans.org>,
Mahmoud Mandour <ma.mandourr@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] contrib/plugins: add meson build file
Date: Mon, 19 Jun 2023 19:04:25 +0100 [thread overview]
Message-ID: <87ilbjjpih.fsf@linaro.org> (raw)
In-Reply-To: <20230615141315.961315-1-anton.kochkov@proton.me>
Anton Kochkov <anton.kochkov@proton.me> writes:
> 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.
I think you should go the whole hog and remove the existing makefile
machinery. Otherwise it will be confusing to users who add new plugins
to the contrib directory.
Can the overall QEMU meson invoke this directly or will it get confused
by it being a separate project?
>
> 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')
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
prev parent reply other threads:[~2023-06-19 18:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 14:14 [PATCH] contrib/plugins: add meson build file Anton Kochkov
2023-06-19 18:04 ` Alex Bennée [this message]
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=87ilbjjpih.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=anton.kochkov@proton.me \
--cc=erdnaxe@crans.org \
--cc=ma.mandourr@gmail.com \
--cc=pbonzini@redhat.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).