C++ Logo

sg15

Advanced search

Re: What is the outcome of the 12-12 meeting for the initial question: the location of std module units?

From: Iain Sandoe <iain_at_[hidden]>
Date: Thu, 14 Dec 2023 12:02:20 +0000
> On 14 Dec 2023, at 11:36, Bret Brown via SG15 <sg15_at_[hidden]> wrote:
>
> It was also suggested to talk to the Linux Foundation folks to make sure the choices are appropriate with respect to the Linux Filesystem Hierarchy Standard (FHS). Possibly the module interfaces themselves could live in a subdirectory of $prefix/include but the metadata file will sometimes be less portable than that (that is, contain different flags depending on the consumption use case). That is because the metadata will be describing the library binary too, so the lib part of the hierarchy seems appropriate.

Indeed, having one metadata file alongside each ABI slice (multilib) would seem a reasonable first step - since the toolchain (in the broader sense, to reflect Tom’s comment that link lines might come from some other tool) aready knows how to translate ABI-determining flags into the place to find that binary, that would ensure that the metadata was tied to the specific ABI slice.

We do need to cater for cases where multiple ABI slices can live in a single location (macOS, AIX).

Iain

>
> Bret
>
> On Thu, Dec 14, 2023, 04:51 Michael Spencer via SG15 <sg15_at_[hidden]> wrote:
> On Wed, Dec 13, 2023 at 8:23 AM Chuanqi Xu via SG15 <sg15_at_[hidden]> wrote:
> Hi Guys,
>
> I didn't take part in the meeting so I am curious. After the meeting, I see plenty of discussions about module metadata files. I am not against this.
> But I am wondering if the initial question got answered. I didn't see it anywhere. Sorry if I missed.
>
> In my mind, the motivation of the meeting should be the location of the std modules. Should it be <PREFIX>/modules/c++/v1? Should it be `/usr/include/c++/$version`? Or should it be `$PREFIX/share/c++/modules`? ....
>
> Do we have any consensus on this?
>
>
> Thanks,
> Chuanqi
>
> To expand on Daniel's answer a bit more (still waiting on the meeting notes to get posted).
>
> We agreed that:
> * We need a metadata file because there are additional flags needed and how you compile it depends on the library binary you're linking against
> * The compiler needs to say where that file is given a base command line (so including target and ABI affecting flags)
> * GCC compatible compiler drivers already have `-print-file-name` that can be used for this purpose
> * Ecosystem IS should document this
>
> Also discussed that GCC and LLVM can talk to each other to coordinate on filesystem layout, but isn't 100% required because of the metadata file
>
> - Michael Spencer
>
> _______________________________________________
> SG15 mailing list
> SG15_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/sg15
> _______________________________________________
> SG15 mailing list
> SG15_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/sg15

Received on 2023-12-14 12:02:23