C++ Logo


Advanced search

Re: "logical name" of importable headers

From: Boris Kolpackov <boris_at_[hidden]>
Date: Mon, 6 Jun 2022 16:06:59 +0200
Daniel Ruoso <daniel_at_[hidden]> writes:

> While the dynamic module mapper approach works in some cases, it is
> not an universal solution. It is incompatible, for instance, with the
> Remote Execution protocol, which requires all inputs to the compiler
> to be rendered as static files.

An implementation can use the dynamic mapper to produce a partially-
preprocessed (-fdirectives-only/-frewrite-includes) source and, in the
process, discover all the header unit and named module BMIs required
by this TU. Together with the compiler options they are all that's
needed (well, besides the compiler) to compile this TU on a different
host. This is the model build2 implements and this is how we plan to
support distributed compilation and caching.

While I am not against the "prescan the world" approach (it could
be the only viable solution for meta-build systems), I don't think
the module mapper approach should be dismissed. The reason why I
keep chiming in with the "and that's how you do it with the module
mapper" emails is because the discussion here is becoming more and
more prescan-centric.

Received on 2022-06-06 14:07:05