C++ Logo

sg15

Advanced search

Re: P2581R0: Specifying the Interoperability of Binary Module Interface Files

From: Ben Boeckel <ben.boeckel_at_[hidden]>
Date: Mon, 2 May 2022 18:23:04 -0400
On Sun, May 01, 2022 at 11:55:50 -0400, Daniel Ruoso via SG15 wrote:
> In the case of CMake, for instance (and I'd like to hear from the
> CMake folks here), I expect that when creating the target for a
> library that imports modules, that imported target will not be
> affected by the target that consumes the module. IOW, the module needs
> to be parsed with the base toolchain configuration, plus include
> directories and compiler definitions defined in the module metadata.
> Otherwise you would risk having different parsings of the same module
> in the same build, which would very likely result in incoherent builds
> in the end.

For named modules, yes. I can't think of a reason why it would matter
myself, but I'm also not an implementor; I'm sure there are gremlins in
the details. For header units, it seems that some implementations
(Clang) may care about consuming target flags. I wish it to not be so,
but that's something for the Clang developers to (hopefully) figure out.

--Ben

Received on 2022-05-02 22:23:07