qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
	Kyle Evans <kevans@freebsd.org>,
	Richard Henderson <richard.henderson@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Laurent Vivier <laurent@vivier.eu>, Warner Losh <imp@bsdimp.com>
Subject: Re: [PATCH 1/2] bsd-user: Only process meson rules on BSD host
Date: Tue, 5 Oct 2021 21:23:39 +0200	[thread overview]
Message-ID: <e22db608-8d57-de7b-e9a9-aa062f4fbd7b@redhat.com> (raw)
In-Reply-To: <CAFEAcA-+VJgRJjBCaVQak0kq4ruku64riNOESFAse3+ZJdWq0w@mail.gmail.com>

On 27/09/21 11:54, Peter Maydell wrote:
> True, but "meson.build is evaluated but just does nothing or
> adds files to a sourceset that isn't used" is pretty common
> (hw/pci/meson.build is evaluated even if we're not building
> a system with PCI support, for example).

Selection of files from hw/pci/meson.build is based on per-target 
definitions, so there's no way around when:/if_true:.  (Technically, 
hw/pci/meson.build also as an if_false, so there's *really* no way 
around parsing it).

Instead, when the definition is constant across all targets, it is 
possible to use either when:/if_true: or an "if" as in

if have_user
   util_ss.add(files('selfmap.c'))
endif

or the various "if m[0].found()" found in directories that build shared 
modules.  In this case I personally lean more towards the latter, but 
when:/if_true: is a little more compact so both are acceptable.

Paolo



  reply	other threads:[~2021-10-05 19:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-26 22:01 [PATCH 0/2] user-mode: Avoid processing unnecessary meson rules Philippe Mathieu-Daudé
2021-09-26 22:01 ` [PATCH 1/2] bsd-user: Only process meson rules on BSD host Philippe Mathieu-Daudé
2021-09-26 23:08   ` Richard Henderson
2021-09-26 23:31     ` Warner Losh
2021-09-27  5:24     ` Philippe Mathieu-Daudé
2021-10-05 19:16       ` Paolo Bonzini
2021-09-27  2:42   ` WANG Xuerui
2021-09-27  2:59     ` WANG Xuerui
2021-09-27  9:14   ` Peter Maydell
2021-09-27  9:40     ` Philippe Mathieu-Daudé
2021-09-27  9:54       ` Peter Maydell
2021-10-05 19:23         ` Paolo Bonzini [this message]
2021-10-05 18:28       ` Alex Bennée
2021-09-27  9:52   ` Daniel P. Berrangé
2021-09-27 10:07     ` Peter Maydell
2021-09-27 10:53       ` Warner Losh
2021-10-05 19:26     ` Paolo Bonzini
2021-10-05 20:41       ` Laurent Vivier
2021-10-05 20:46         ` Warner Losh
2021-10-06  6:02           ` Laurent Vivier
2021-09-26 22:01 ` [PATCH 2/2] linux-user: Only process meson rules on Linux host Philippe Mathieu-Daudé
2021-09-27  2:42   ` WANG Xuerui

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=e22db608-8d57-de7b-e9a9-aa062f4fbd7b@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=imp@bsdimp.com \
    --cc=kevans@freebsd.org \
    --cc=laurent@vivier.eu \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=richard.henderson@linaro.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).