From: Akihiko Odaki <akihiko.odaki@gmail.com>
To: Anton Kochkov <anton.kochkov@proton.me>, qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"Alexandre Iooss" <erdnaxe@crans.org>,
"Mahmoud Mandour" <ma.mandourr@gmail.com>
Subject: Re: [PATCH v2 1/2] contrib/plugins: add meson build file
Date: Wed, 2 Aug 2023 17:16:31 +0900 [thread overview]
Message-ID: <d205f5a6-c7ec-c8a2-74f6-901dac1774e4@gmail.com> (raw)
In-Reply-To: <20230628162451.147419-2-anton.kochkov@proton.me>
Thanks for letting me know this on GitLab.
On 2023/06/29 1:26, Anton Kochkov wrote:
> 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
The default value should be provided in meson_options.txt.
> +
> +qemu_include = qemu_src + '/include/qemu'
I think the following is more idiomatic:
qemu_include = qemu_src / 'include/qemu'
Regards,
Akihiko Odaki
> +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-08-02 8:16 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 ` [PATCH v2 1/2] contrib/plugins: add meson build file Anton Kochkov
2023-08-02 8:16 ` Akihiko Odaki [this message]
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=d205f5a6-c7ec-c8a2-74f6-901dac1774e4@gmail.com \
--to=akihiko.odaki@gmail.com \
--cc=alex.bennee@linaro.org \
--cc=anton.kochkov@proton.me \
--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).