[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 24/24] configure: automatically parse command line for mes
From: |
Thomas Huth |
Subject: |
Re: [PATCH v2 24/24] configure: automatically parse command line for meson -D options |
Date: |
Tue, 12 Oct 2021 20:15:23 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
On 12/10/2021 13.13, Paolo Bonzini wrote:
Right now meson_options.txt lists about 90 options. Each option
needs code in configure to parse it and pass the option down to Meson as
a -D command-line argument; in addition the default must be duplicated
between configure and meson_options.txt. This series tries to remove
the code duplication by generating the case statement for those --enable
and --disable options, as well as the corresponding help text.
About 80% of the options can be handled completely by the new mechanism.
Eight meson options are not of the --enable/--disable kind. Six more need
to be parsed in configure for various reasons documented in the patch,
but they still have their help automatically generated.
The advantages are:
- less code in configure
- parsing and help is more consistent (for example --enable-blobs was
not supported)
- options are described entirely in one place, meson_options.txt.
This make it more attractive to use Meson options instead of
hand-crafted configure options and config-host.mak
A few options change name: --enable-tcmalloc and --enable-jemalloc
become --enable-malloc={tcmalloc,jemalloc}; --disable-blobs becomes
--disable-install-blobs; --enable-trace-backend becomes
--enable-trace-backends.
... and you provide compatibility wrappers now - maybe worth to mention it here.
...
@@ -1793,18 +1427,12 @@ Advanced options (experts only):
(by default affects only QEMU, not tools like
qemu-img)
--enable-block-drv-whitelist-in-tools
use block whitelist also in tools instead of only
QEMU
- --enable-trace-backends=B Set trace backend
- Available backends: $trace_backend_list
Old output with --help:
--enable-trace-backend=B Set trace backend
Available backends: nop, dtrace, ftrace, simple,
stderr, ust
New output:
--enable-trace-backends=CHOICE
Set available tracing backends [log]
Why does it fail to list the choices here? ... it works for the other
options like "--enable-malloc"?
Thomas
- Re: [PATCH v2 16/24] configure, meson: move vde detection to meson, (continued)
- [PATCH v2 17/24] configure, meson: move netmap detection to meson, Paolo Bonzini, 2021/10/12
- [PATCH v2 21/24] configure: remove deprecated --{enable, disable}-git-update, Paolo Bonzini, 2021/10/12
- [PATCH v2 20/24] configure, meson: move more compiler checks to Meson, Paolo Bonzini, 2021/10/12
- [PATCH v2 22/24] configure: accept "internal" for --enable-capstone/slirp/fdt, Paolo Bonzini, 2021/10/12
- [PATCH v2 23/24] configure: prepare for auto-generated option parsing, Paolo Bonzini, 2021/10/12
- [PATCH v2 19/24] configure: remove obsolete Solaris ar check, Paolo Bonzini, 2021/10/12
- [PATCH v2 24/24] configure: automatically parse command line for meson -D options, Paolo Bonzini, 2021/10/12
- Re: [PATCH v2 24/24] configure: automatically parse command line for meson -D options,
Thomas Huth <=
- Re: [PATCH v2 24/24] configure: automatically parse command line for meson -D options, Paolo Bonzini, 2021/10/13
- Re: [PATCH v2 24/24] configure: automatically parse command line for meson -D options, Paolo Bonzini, 2021/10/13
- Re: [PATCH v2 24/24] configure: automatically parse command line for meson -D options, Thomas Huth, 2021/10/13
- Re: [PATCH v2 24/24] configure: automatically parse command line for meson -D options, Paolo Bonzini, 2021/10/13
- Re: [PATCH v2 24/24] configure: automatically parse command line for meson -D options, Thomas Huth, 2021/10/14