[cfe-dev] [Modules TS] Have the file formats been decided?

Manuel Klimek via cfe-dev cfe-dev at lists.llvm.org
Wed Jan 18 23:08:07 PST 2017


On Wed, Jan 18, 2017 at 10:20 PM Stephen Kelly <steveire at gmail.com> wrote:

> On 01/18/2017 11:12 AM, Manuel Klimek wrote:
>
> On Wed, Jan 18, 2017 at 1:15 AM Stephen Kelly via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
> Richard Smith via cfe-dev wrote:
>
> > This does mean that build systems will need to track interface
> > dependencies in a way they didn't before (you need to know which module
> > interfaces should be built before which other module interfaces), and
> that
> > information will either need to be provided or detected by the build
> > system. If a build system wishes to automate this, it would not be
> > dissimilar to the #include scanning that some existing build systems
> > already perform.
>
> In my perspective the biggest problem with clang modules (and the reason I
> stopped investigating it from a buildsystem perspective) is
>
>  https://llvm.org/bugs/show_bug.cgi?id=21593
>
>
> I believe explicit module maps solve your problem, but your bug doesn't
> contain enough information to know what you want :)
>
>
> Hi Manuel,
>
> I don't know what "explicit module maps" means.
>

You can give the module maps necessary to clang at the command line instead
of relying on clang finding them somewhere.


> The bug report links to a mailing list thread. Does that provide more
> context? IOW: Why make
>
>  /usr/include/module.modulemap
>
> contended by everything that installs into /usr ? Was a solution of
> uncontended
>
>  /usr/include/<name>.modulemap
>
> considered and discarded? Why?
>

You can have /usr/include/<name>.modulemap if you want. Your build system
just will need to support that.

You can even put your module map in /usr/lib or wherever else other parts
of your library are going to be installed in, as long as build systems will
pick up the right flags to compile your library with.

The current implementation of automatic detection of module maps is
completely driven by the original Obj-C use cases.
For C++, I don't expect that we will use that mechanism, much for the
reasons you cite. My hope is that we'll go into a world where we explicitly
specify the module maps on the command line (less magic!).

Cheers,
/Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170119/863205df/attachment.html>


More information about the cfe-dev mailing list