mbox series

[v2,0/6] buildsys: Build faster (mostly tools and linux-user)

Message ID 20200118140619.26333-1-philmd@redhat.com (mailing list archive)
Headers show
Series buildsys: Build faster (mostly tools and linux-user) | expand

Message

Philippe Mathieu-Daudé Jan. 18, 2020, 2:06 p.m. UTC
In some configuration (linux-user, tools) we can ignore building
various objects (and the libfdt).

Tested with all the combinations of --[enable|disable]-tools,
--[enable|disable]-user and --[enable|disable]-system using the
following commands (suggested by Laurent Vivier in v1):

  $ mkdir build
  $ cd build
  $ for user in enable disable; do \
        for tools in enable disable; do \
            for system in enable disable; do \
                rm -fr build-$user-$system-$tools && \
                mkdir build-$user-$system-$tools && \
                    (cd build-$user-$system-$tools && \
                     ../../configure \
                                     --${user}-user \
                                     --${system}-system \
                                     --${tools}-tools \
                                     --disable-docs \
                    ); \
            done; \
        done; \
    done

Then building each of the 8 subdirectories on x86_64 and aarch64
hosts, running 'make check', and only on x86_64:
'make run-tcg-tests-x86_64-linux-user'.

All CI green:
https://gitlab.com/philmd/qemu/pipelines/110420332
https://travis-ci.org/philmd/qemu/builds/638781159
https://app.shippable.com/github/philmd/qemu/runs/587/summary/console

Since v1:
- no code change, improved commit description, added review tags
- added 2 new patches touching hw/core/ (remove reset.o from linux-user)

$ git backport-diff -u v1
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/6:[----] [--] 'configure: Do not build libfdt if not required'
002/6:[----] [--] 'Makefile: Clarify all the codebase requires qom/ objects'
003/6:[----] [--] 'Makefile: Restrict system emulation and tools objects'
004/6:[----] [--] 'Makefile: Remove unhelpful comment'
005/6:[down] 'hw/core: Restrict reset handlers API to system-mode'
006/6:[down] 'hw/core/Makefile: Group generic objects versus system-mode objects'

Supersedes: <20200109153939.27173-1-philmd@redhat.com>

Philippe Mathieu-Daudé (6):
  configure: Do not build libfdt if not required
  Makefile: Clarify all the codebase requires qom/ objects
  Makefile: Restrict system emulation and tools objects
  Makefile: Remove unhelpful comment
  hw/core: Restrict reset handlers API to system-mode
  hw/core/Makefile: Group generic objects versus system-mode objects

 configure             |  2 ++
 Makefile.objs         | 31 ++++++++++---------------------
 hw/core/Makefile.objs | 31 ++++++++++++++++---------------
 3 files changed, 28 insertions(+), 36 deletions(-)

Comments

Philippe Mathieu-Daudé Jan. 18, 2020, 2:22 p.m. UTC | #1
On 1/18/20 3:06 PM, Philippe Mathieu-Daudé wrote:
> In some configuration (linux-user, tools) we can ignore building
> various objects (and the libfdt).
> 
> Tested with all the combinations of --[enable|disable]-tools,
> --[enable|disable]-user and --[enable|disable]-system using the
> following commands (suggested by Laurent Vivier in v1):
> 
>    $ mkdir build
>    $ cd build
>    $ for user in enable disable; do \
>          for tools in enable disable; do \
>              for system in enable disable; do \
>                  rm -fr build-$user-$system-$tools && \
>                  mkdir build-$user-$system-$tools && \
>                      (cd build-$user-$system-$tools && \
>                       ../../configure \
>                                       --${user}-user \
>                                       --${system}-system \
>                                       --${tools}-tools \
>                                       --disable-docs \
>                      ); \
>              done; \
>          done; \
>      done
> 
> Then building each of the 8 subdirectories on x86_64 and aarch64
> hosts, running 'make check', and only on x86_64:
> 'make run-tcg-tests-x86_64-linux-user'.
> 
> All CI green:
> https://gitlab.com/philmd/qemu/pipelines/110420332
> https://travis-ci.org/philmd/qemu/builds/638781159
> https://app.shippable.com/github/philmd/qemu/runs/587/summary/console
> 
> Since v1:
> - no code change, improved commit description, added review tags
> - added 2 new patches touching hw/core/ (remove reset.o from linux-user)
> 
> $ git backport-diff -u v1
> Key:
> [----] : patches are identical
> [####] : number of functional differences between upstream/downstream patch
> [down] : patch is downstream-only
> The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
> 
> 001/6:[----] [--] 'configure: Do not build libfdt if not required'
> 002/6:[----] [--] 'Makefile: Clarify all the codebase requires qom/ objects'
> 003/6:[----] [--] 'Makefile: Restrict system emulation and tools objects'
> 004/6:[----] [--] 'Makefile: Remove unhelpful comment'
> 005/6:[down] 'hw/core: Restrict reset handlers API to system-mode'
> 006/6:[down] 'hw/core/Makefile: Group generic objects versus system-mode objects'
> 
> Supersedes: <20200109153939.27173-1-philmd@redhat.com>

   ^ testing latest patchew feature, v2 has different subject name
     than v1, but patchew successfully linked them :)

See "Diff against v1" in v2:
https://patchew.org/QEMU/20200118140619.26333-1-philmd@redhat.com/

https://patchew.org/QEMU/20200109153939.27173-1-philmd@redhat.com/diff/20200118140619.26333-1-philmd@redhat.com/

Thanks Kevin & Paolo for this feature :)
Paolo Bonzini Jan. 21, 2020, 10:54 a.m. UTC | #2
On 18/01/20 15:22, Philippe Mathieu-Daudé wrote:
>>
>> Supersedes: <20200109153939.27173-1-philmd@redhat.com>
> 
>   ^ testing latest patchew feature, v2 has different subject name
>     than v1, but patchew successfully linked them :)

Appreciated!  You've now demonstrated the case where the header is
included in the cover letter rather than a separate message.  :)

Series queued, thanks.

Paolo

> See "Diff against v1" in v2:
> https://patchew.org/QEMU/20200118140619.26333-1-philmd@redhat.com/
> 
> https://patchew.org/QEMU/20200109153939.27173-1-philmd@redhat.com/diff/20200118140619.26333-1-philmd@redhat.com/
> 
> 
> Thanks Kevin & Paolo for this feature :)