C++ Logo

sg15

Advanced search

Re: Proposal for module metadata format to be used by the std library and others

From: Boris Kolpackov <boris_at_[hidden]>
Date: Wed, 13 Dec 2023 17:13:39 +0200
Daniel Ruoso via SG15 <sg15_at_[hidden]> writes:

> * The compiler should offer a mechanism to introspect the path to the
> metadata file of the standard library, with the settings that the compiler
> will be used. That means build systems don't need to perform the lookup of
> the metadata.
>
> Here's how I would expect that would look like for a standard library
> (assuming the modules file for now), such as libc++:
>
> {
> "version": 1,
> "revision": 1,
> "modules": [
> {
> "logical-name": "std",
> "source-path": "modules/std.cppm",
> "is-standard-library": true
> },
> {
> "logical-name": "std.compat",
> "source-path": "modules/std.compat.cppm"
> "is-std-library": true
> },
> [...]
> ]
> }

Am I understanding this correctly: the compiler will provide to the
build system the location of such a metadata file for the standard
library modules and from that metadata file the build system will
be able to obtain the location of the module interface units?

And it looks like at least for now and for MS STL and libc++, those
locations will be the only useful thing that build systems will get
from this metadata file?

Received on 2023-12-13 15:13:34