Re: ccache, MSVC, and meson

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: ccache, MSVC, and meson
Date: 2022-07-01 19:18:41
Message-ID: 20220701191841.GH13040@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 24, 2022 at 01:30:39PM -0700, Andres Freund wrote:
> On 2022-05-24 14:52:02 -0500, Justin Pryzby wrote:
> > > 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.
> >
> > if meson didn't crash CC=ccache.exe might have worked, because I had set
> > CCACHE_COMPILER.
>
> Did you report the issue? Should be simple enough to fix.
>
> I seriously doubt it's a good idea to use CCACHE_COMPILER - there's no way
> meson (or autoconf or ..) can rely on the results of compiler tests that way,
> since CCACHE_COMPILER can change at any time.

This updated patch doesn't use CCACHE_COMPILER.

cache misses are several times slower (12 minute build time vs 2:30 with ninja,
without ccache), so it's possible that can be *slower* if the hit ratio is
inadequate. ninja on cirrus builds 3x faster with ccache, but msbuild is only
~2x faster, so I recommend using it only with ninja.

There's still warts requires using "plain" with /Z7 /MDd.

Attachment Content-Type Size
0001-cirrus-windows-ccache.patch text/x-diff 3.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ibrar Ahmed 2022-07-01 20:03:22 Re: Minimal logical decoding on standbys
Previous Message Andres Freund 2022-07-01 19:16:42 Re: [RFC] building postgres with meson -v9