qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-devel@nongnu.org,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH 2/3] configure: Remove options that can be handled via meson_options.txt instead
Date: Mon, 30 Aug 2021 18:33:15 +0200	[thread overview]
Message-ID: <b21d6830-e1fe-9722-eebe-515d9e4344fc@redhat.com> (raw)
In-Reply-To: <20210830150625.l76qozj4lzmuqsf7@redhat.com>

On 30/08/2021 17.06, Eric Blake wrote:
> On Sun, Aug 29, 2021 at 07:32:09PM +0200, Thomas Huth wrote:
>> These trivial options can now be handled via the new generic code
>> that parses meson_options.txt
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   configure         | 316 +---------------------------------------------
>>   meson_options.txt |   2 +-
>>   2 files changed, 5 insertions(+), 313 deletions(-)
> 
> Picking on one example...
> 
>>
>> diff --git a/configure b/configure
>> index b3e6d51916..cb125c3f84 100755
>> --- a/configure
>> +++ b/configure
>> @@ -291,34 +291,14 @@ for opt do
>>     esac
>>   done
>>   
>> -brlapi="auto"
> 
>> -  --disable-brlapi) brlapi="disabled"
>> -  ;;
>> -  --enable-brlapi) brlapi="enabled"
>> -  ;;
> 
>> @@ -5213,25 +4920,10 @@ if test "$skip_meson" = no; then
>>           -Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \
>>           ${staticpic:+-Db_staticpic=$staticpic} \
>>           -Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \
>> -        -Db_lto=$lto -Dcfi=$cfi -Dcfi_debug=$cfi_debug \
>> -        -Dmalloc=$malloc -Dmalloc_trim=$malloc_trim -Dsparse=$sparse \
>> -        -Dkvm=$kvm -Dhax=$hax -Dwhpx=$whpx -Dhvf=$hvf -Dnvmm=$nvmm \
>> -        -Dxen=$xen -Dxen_pci_passthrough=$xen_pci_passthrough -Dtcg=$tcg \
>> -        -Dcocoa=$cocoa -Dgtk=$gtk -Dmpath=$mpath -Dsdl=$sdl -Dsdl_image=$sdl_image \
>> -        -Dlibusb=$libusb -Dsmartcard=$smartcard -Dusb_redir=$usb_redir -Dvte=$vte \
>> -        -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \
>> -        -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \
>> -        -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \
> 
> Pre-patch, if you used neither --enable-brlapi nor --disable-brlapi,
> we called $meson with -Dbrlapi=auto.
> 
>> +        -Db_lto=$lto -Dcfi=$cfi -Dcfi_debug=$cfi_debug -Dmalloc=$malloc \
>> +        -Ddefault_devices=$default_devices -Dxen=$xen -Dtcg=$tcg -Dsdl=$sdl \
>> +        -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt \
>> +        -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \
>>           $(if test "$default_feature" = no; then echo "-Dauto_features=disabled"; fi) \
>>           -Dtcg_interpreter=$tcg_interpreter $meson_options \
> 
> Post-patch, if you use an option, $meson_options includes
> -Dbrlapi=disabled or -Dbrlapi=enabled (per patch 1), but if you omit
> an option, now we aren't passing anything.  Does meson treat
> -Dbrlapi=auto and the absence of any mention of brlapi identically?

I can confirm what you've already discovered later in your review already: 
The "auto" setting is used by default in meson_options.txt already.

>> diff --git a/meson_options.txt b/meson_options.txt
>> index a9a9b8f4c6..2c89e79e8b 100644
>> --- a/meson_options.txt
>> +++ b/meson_options.txt
>> @@ -120,7 +120,7 @@ option('usb_redir', type : 'feature', value : 'auto',
>>          description: 'libusbredir support')
>>   option('virglrenderer', type : 'feature', value : 'auto',
>>          description: 'virgl rendering support')
>> -option('vnc', type : 'feature', value : 'enabled',
>> +option('vnc', type : 'feature', value : 'auto',
>>          description: 'VNC server')
> 
> Why is the default for this option changed?  It looks unrelated to the
> mechanical changes in the rest of the patch, enough so to warrant its
> own patch, or at least special mention in the commit message.

Agreed, I think I'll best split it into a separate patch. For the context: I 
should have changed this already in 3a6a1256d46daa2121 ("configure: Allow 
vnc to get disabled with --without-default-features"), but I was not aware 
of the duplicated values between meson_options.txt and the configure script 
at that point in time yet.

  Thomas



  parent reply	other threads:[~2021-08-30 16:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-29 17:32 [PATCH 0/3] Use meson_options.txt in the configure script Thomas Huth
2021-08-29 17:32 ` [PATCH 1/3] configure: Add the possibility to read options from meson_options.txt Thomas Huth
2021-08-30 14:47   ` Eric Blake
2021-08-29 17:32 ` [PATCH 2/3] configure: Remove options that can be handled via meson_options.txt instead Thomas Huth
2021-08-30 15:06   ` Eric Blake
2021-08-30 15:33     ` Richard Henderson
2021-08-30 16:33     ` Thomas Huth [this message]
2021-08-29 17:32 ` [PATCH 3/3] configure: Get help text from meson_options.txt Thomas Huth
2021-08-30 15:30   ` Eric Blake
2021-08-30 16:48     ` Thomas Huth
2021-08-29 21:22 ` [PATCH 0/3] Use meson_options.txt in the configure script Marc-André Lureau
2021-08-30  5:11   ` Thomas Huth
2021-08-30  9:12     ` Philippe Mathieu-Daudé
2021-08-30  9:21       ` Peter Maydell
2021-08-31 12:49     ` Paolo Bonzini

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=b21d6830-e1fe-9722-eebe-515d9e4344fc@redhat.com \
    --to=thuth@redhat.com \
    --cc=eblake@redhat.com \
    --cc=marcandre.lureau@redhat.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).