Hi,
On 2022-05-22 18:26:06 -0500, Justin Pryzby wrote:
> forking: <20220307191054.n5enrlf6kdn7zc42@alap3.anarazel.de>
>
> An update.
>
> ccache 4.6.1 was released which allows compiling postgres
> I submitted a request to update the package in chocolatey.
>
> But with the existing build system, it's no faster anyway, I guess due to poor
> use of parallelism.
> https://cirrus-ci.com/task/5972008205811712
No, because it never uses caching, because the way we set the output director
causes ccache to never cache.
> Currently, meson doesn't (automatically) use ccache with MSVC - see
> mesonbuild/environment.py.
>
> And CC=ccache gives an error - I suppose it should not try to pop ccache off the
> compiler list if the list has only one element.
> [...]
> But it can be convinced to use ccache by renaming the executable to "pgccache".
> Which builds in 46sec: https://cirrus-ci.com/task/4862234995195904
> This requires ccache 4.6, released in Feburary and already in choco.
> Note that ccache supports neither /Zi debugging nor precompiled headers.
> I'm not sure, but -Dc_args=/Z7 may do what's wanted here.
The spurious message should be fixed, of course. I suspect you dont need a
wrapper, you can just set CC='ccache cl.exe' or similar? Afaics it's not
meaningful to do 'CC=ccache.exe' alone, because then it'll interpret arguments
as ccache options, rather than compiler options.
Greetings,
Andres Freund