[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] bsd-user: Only process meson rules on BSD host
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH 1/2] bsd-user: Only process meson rules on BSD host |
Date: |
Mon, 27 Sep 2021 10:52:31 +0100 |
User-agent: |
Mutt/2.0.7 (2021-05-04) |
On Mon, Sep 27, 2021 at 12:01:02AM +0200, Philippe Mathieu-Daudé wrote:
> Reported-by: Warner Losh <imp@bsdimp.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> bsd-user/meson.build | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/bsd-user/meson.build b/bsd-user/meson.build
> index 03695493408..a7607e1c884 100644
> --- a/bsd-user/meson.build
> +++ b/bsd-user/meson.build
> @@ -1,3 +1,7 @@
> +if not config_host.has_key('CONFIG_BSD')
> + subdir_done()
> +endif
> +
> bsd_user_ss.add(files(
> 'bsdload.c',
> 'elfload.c',
If we look at the big picture across the root meson.build, and this
meson.build we have
bsd_user_ss = ss.source_set()
...
bsd_user_ss.add(files(
'bsdload.c',
'elfload.c',
'main.c',
'mmap.c',
'signal.c',
'strace.c',
'syscall.c',
'uaccess.c',
))
...
bsd_user_ss.add(files('gdbstub.c'))
specific_ss.add_all(when: 'CONFIG_BSD_USER', if_true: bsd_user_ss)
So without this change, we're already correctly dropping bsd_user_ss
in its entirity, when not on BSD.
With this change, we're dropping some, but not all, of bsd_user_ss
files - gdbstub.c remains.
So this change on its own doesn't make a whole lot of sense.
If we look at linux-user/meson.build though things are more complex.
There we have alot of sub-dirs, and meson.biuld in those dirs adds
generators for various files. So conceivably skipping linux-user
will mean we won't auto-generate files we don't need on non-Linux.
With that in mind, I think it makes conceptual sense to have this
bsd-user/meson.build change, for the purpose of design consistency,
even if it doesn't have any real world benefit for bsd-user today.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
[PATCH 2/2] linux-user: Only process meson rules on Linux host, Philippe Mathieu-Daudé, 2021/09/26