qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Status update on Meson features needed by QEMU


From: Paolo Bonzini
Subject: [Qemu-devel] Status update on Meson features needed by QEMU
Date: Mon, 27 May 2019 18:16:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hi all,

if everything goes according to plan, Meson 0.51.0 (out in a couple of
weeks) should have everything needed for QEMU.  I am not sure whether
I'll have time to attempt a partial conversion to have something to
show, but anyway this is a status update.

On 06/03/19 19:12, Paolo Bonzini wrote:
> - ease of use for test logs and the ability to cut and paste test
> invocations from the logs to the command line.  For this I have started
> "probing" how the Meson developers feel about this kind of change[1],
> and intend to follow up until the meson test driver is comparable in
> usability to QEMU's "make check",

This wasn't accepted, on the other hand Meson has an introspection
mechanism to export test definitions as JSON.  It should be easy to
generate Make rules from it and keep using the current TAP driver.  I
have a pending pull request to fix a bug there, which should be accepted
in 0.51.0.

> - ease of converting Makefile.objs files.  The Makefile.objs files are
> very nice to change for simple modifications, and any replacement should
> have the same feature.  This will require a Meson extension.

This was accepted.  The final syntax looks like

    obj.add(when: 'CONFIG_VIRTIO', if_true: files('virtio.c'),
                                   if_false: files('virtio-stub.c'))

    sdl_obj.add(if_true: files('sdl.c'))
    sdl_obj.add_all(when: 'CONFIG_OPENGL', if_true: opengl_obj)
    common_obj.add_all(when: sdl, if_true: sdl_obj)

> - ability to use the Kconfig declarations for dependencies.
The Kconfig parser was accepted.  It should therefore be possible to
invoke minikconf from Meson (rather than from Make) to process the
dependencies, load the result via the parser and use it as the input to
the source code selection rules.

> - Meson generates a build.ninja file rather than a Makefile

... and requires Ninja to be present when Meson runs, in order to
generate compile_commands.json.  For this I added more functionality to
my ninja lexer/parser so that (in addition to generating a Makefile from
build.ninja) it can also be used to emulate the "ninja -t compdb"
command which generates the file.  The resulting  tool can be found at
https://gist.github.com/bonzini/fd3b69f5682f7e2eca817fb797c2db0f.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]