pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-hackers@postgresql.org, Thomas Munro <thomas.munro@gmail.com>
Cc: Melanie Plageman <melanieplageman@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Daniel Gustafsson <daniel@yesql.se>
Subject: ccache, MSVC, and meson
Date: Sun, 22 May 2022 18:26:06 -0500
Message-ID: <20220522232606.GZ19626@telsasoft.com> (raw)

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

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.

|[21:44:49.791]   File "C:\python\lib\site-packages\mesonbuild\compilers\detect.py", line 375, in _detect_c_or_cpp_compiler
|[21:44:49.791]     compiler_name = os.path.basename(compiler[0])
|[21:44:49.791] IndexError: list index out of range
|...
|[21:44:49.791] meson.build:1:0: ERROR: Unhandled python exception
|[21:44:49.791] 
|[21:44:49.791]     This is a Meson bug and should be reported!

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.





view thread (11+ messages)  latest in thread

Message-ID: <20220522232606.GZ19626@telsasoft.com>
Permalink:  ../20220522232606.GZ19626@telsasoft.com/
Also on:    postgresql.org/message-id/20220522232606.GZ19626@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, andres@anarazel.de, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, andrew@dunslane.net, thomas.munro@gmail.com, melanieplageman@gmail.com, peter.eisentraut@enterprisedb.com, daniel@yesql.se
  Subject: Re: ccache, MSVC, and meson
  In-Reply-To: <20220522232606.GZ19626@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox