qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH v2 01/12] gitlab: enable ccache for many build jobs


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 01/12] gitlab: enable ccache for many build jobs
Date: Fri, 25 Aug 2023 10:34:42 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0

On 25/8/23 09:46, Michael Tokarev wrote:
24.08.2023 19:38, Alex Bennée wrote:
From: Daniel P. Berrangé <berrange@redhat.com>

The `ccache` tool can be very effective at reducing compilation times
when re-running pipelines with only minor changes each time. For example
a fresh 'build-system-fedora' job will typically take 20 minutes on the
gitlab.com shared runners. With ccache this is reduced to as little as
6 minutes.

I've been using ccache when building qemu in debian, for quite a while.

The problem here, in the way qemu build system works, is that the cache
is hugely dependent on the path to the source. You change just one char
in there (/build/qemu/v8.1.0/ => /build/qemu/v8.1.1) and whole cache becomes
unusable, it all gets compiled anew.  This is because qemu build sys uses
absolute file names when building, and this is detected by ccache, so
the source dir gets mixed into the hash together with gcc version and
other things.

__FILE__ is used by assert() family, some DEBUG_PRINTF(), but mainly
by "qapi/error.h", so all error_setg*() calls.

This has been bugging me since quite some time, since if you build
the same QEMU in different paths (usually on different machines) then
the output doesn't match.

GCC 8 & Clang 10 provides -ffile-prefix-map, but

1/ Our minimal GCC supported is v7.4,
2/ meson doesn't support it. Still there is a feature request:
   https://github.com/mesonbuild/meson/issues/10533


For more info, see also the reproducible build project:
https://reproducible-builds.org/docs/build-path/

Regards,

Phil.



reply via email to

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