C++ Logo

sg15

Advanced search

Re: [SG15] Will any change in a module source or dependencies cause change in the public/reachable surface of the built module?

From: Ben Boeckel <ben.boeckel_at_[hidden]>
Date: Wed, 31 Jul 2019 17:25:38 -0400
On Wed, Jul 31, 2019 at 21:19:13 +0000, Olga Arkhipova wrote:
> >> If the contents are hash-identical, build tools may optionally improve performance
> That is the idea (and the question) - as built modules full content
> (and thus file hash) will be different for "add a comment" change, can
> another hash be created only for public surface?

Build tools don't generally offer a hook to place a "is this different?"
function in the build graph. The way I'd do this is to split it into two
different files, use the minimal one for the build graph and read the
other one if diagnostics are required. This metadata file would not have
anything depending on it (but should be listed as an output). I'll note
that such a setup smells of breaking the "correct" build guidelines, but
maybe in a way that doesn't matter in practice. I suppose a ccache
implementation could then have stale diagnostic information. I'd need to
ponder more on it for a better answer.

--Ben

Received on 2019-07-31 16:27:38