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-05-24 22:17:47
Message-ID: 20220524221747.GM19626@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:
> > As I recall, CC='ccache cl.exe' didn't work because it didn't attempt to do any
> > argument splitting.
>
> I tried it, and it works for me when building with ninja (compiling with
> cl.exe). I assume you are using msbuild?

Apparently it works to write "ccache.exe" but not just "ccache", which is what
I used before.

It seems to work by fooling meson, which intends to strip off the leading
"ccache" but fails due to the "exe", but then happens to do what's desired.

If I'm not wrong, pgccache.exe + CCACHE_COMPILER=cl runs 30sec faster on
cirrus. I suppose it's because windows is running cmd.exe on the
CC="ccache.exe cl".

Also, /O2 cuts ~3 minutes off the test time on cirrus, which seems worth it,
except that it omits frame pointers, which probably breaks debuggability. And
when I pass /Oy- to "avoid omitting" frame pointers, several tests crash...

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2022-05-24 23:04:58 Re: Limiting memory allocation
Previous Message Robert Haas 2022-05-24 22:16:44 Re: postgres_fdw has insufficient support for large object