C++ Logo

sg15

Advanced search

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

From: Steve Downey <sdowney_at_[hidden]>
Date: Wed, 20 Dec 2023 14:20:01 -0500
And presumably the json would point at the same interface files, but
provide asan flags.


On Wed, Dec 20, 2023, 14:01 Mark de Wever via SG15 <sg15_at_[hidden]>
wrote:

> On Wed, Dec 20, 2023 at 03:22:17PM +0000, Iain Sandoe wrote:
> > Hi Folks,
> >
> > > On 19 Dec 2023, at 19:55, Mark de Wever via SG15 <
> sg15_at_[hidden]> wrote:
> > >
> > > On Tue, Dec 12, 2023 at 04:56:32PM -0500, Daniel Ruoso via SG15 wrote:
> > >> As discussed in the meeting on 2023-12-12, I'm putting together a
> proposal
> > >> for the metadata format to be used both when discovering the std
> modules as
> > >> well as for pre-built libraries in general.
> > >
> > > Based on this proposal I've created a libc++ PR [1]. I got a lot of
> > > pushback regarding installing modules in a directory parallel to
> > > include. I've changed that directory. The current tentative location
> is
> > >
> > > <prefix>/usr/share/libc++/v1/
> >
> > My recollection is that (amongst other things) the SG15 discussion
> identified that
> > the manifest/module recipe is more tied to the library binary than the
> headers.
> > For example, (at least for libc++) one set of headers might be designed
> to cater for
> > multiple ISAs or incompatible ABIs; nevertheless, those must be
> distinct in the
> > actual library binar(ies) [either as ABI slices, or as separate
> entities].
> >
> > Manifests/module information files therefore might need to be identified
> on the
> > basis of user’s compile flags that determine one of a set of
> incompatible ABI
> > slices.
> >
> > What is your plan for dealing with this in the proposed install?
>
> I have a patch for Clang with a new `-print` option. Unfortunately Clang
> `-print` options don't look at the `-stdlib` argument. Currently the
> `-print` options show the same include path for libc++ and libstdc++.
>
> This means the libc++ manifest is in the library directory of stdlibc++.
> The plan is to fix that. The intention is that
>
> clang -stdlib=libc++ -print-libray-module-manifest-path
>
> gives
>
> /path/to/libc++_library/libc++.module.json
>
> As Louis mentioned in the meeting there are plans to ship versions of
> libc++ with sanitizers enabled. Then something along the lines of
>
> clang -stdlib=libc++-asan -print-libray-module-manifest-path
>
> would give
>
> /path/to/libc++_library/libc++-asan.module.json
>
> Mark
> _______________________________________________
> SG15 mailing list
> SG15_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/sg15
>

Received on 2023-12-20 19:20:12