RFC: Precompiled Headers for Wine Build (GSoC?)

Kyle Auble kyle.auble at zoho.com
Sun Feb 14 14:01:32 CST 2016


On 02/14/2016 12:15 PM, Michael Müller wrote:
> Am 14.02.2016 um 19:25 schrieb Stefan Dösinger:
>> I guess a good starting point would be to compare the impact of
>> precompiled headers to ccache. My guess is that everyone who wants
>> fast compiles uses ccache these days.
> Precompiled headers can already improve the performance during the first
> compilation unlike ccache which would rather slow it down. This could
> for example reduce the build time on our build servers.
>
> ReactOS uses precompiled header files and they suggested us multiple
> time to also use them in Wine Staging as it reduces the build time a lot
> according to their experience.

Thanks for the feedback; I didn't think about ccache, but that might be 
because I've honestly had mixed results with it in the past.

It's been several months so I could be completely misremembering, but I 
want to say ccache didn't seem to help even subsequent builds of wine on 
my system (which has really old hardware). Just keeping the object files 
for make (which is a no-go for final tests) seemed to make a much bigger 
difference. At the same time, ccache did a great job speeding up builds 
of the linux kernel. Of course, these are all vague memories so I could 
just be forgetting if I finally got ccache working well for wine.

That said, if I understand the precompiled headers correctly, they're 
orthogonal to the caching that make and ccache do. While those check for 
compilations that haven't changed and load results from the cache, the 
precompiled headers let the compiler bypass much of the processing for 
#include-s when it does have to run.

 From what little I've read, it doesn't seem like it would be too hard 
to add the necessary changes to the make files. The main problem I could 
picture is that different compilers might all take a different approach, 
though the only difference for clang seems to be that it uses ".pch" 
instead of ".gch" as the file extension.

Kyle




More information about the wine-devel mailing list