[cfe-dev] [Modules] Dependency Generation
David Blaikie via cfe-dev
cfe-dev at lists.llvm.org
Tue May 15 10:59:27 PDT 2018
Exactly how to integrate build systems with modules TS (or the ATOM
proposal) is a current source of discussion.
For now, with Clang, I don't think there is a way to get dependency
information from the compiler in a way akin to -MM. I'm not sure what
Build2 is doing (the one public build system that's got some support for
modules) - maybe it's doing its own scan of the source files looking for
import lines.
- Dave
On Mon, May 14, 2018 at 2:14 AM Thorsten Schütt via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> Hi,
>
> I am trying to create dependency files for a Makefile for modules TS.
>
> $ cat bar.cppm
> export module bar;
> $ cat foo.cppm
> export module foo;
>
> import bar;
> $ clang++ -MM -fmodules-ts foo.cppm
> foo.cppm:3:8: fatal error: module 'bar' not found
> import bar;
> ~~~~~~~^~~
> foo.o: foo.cppm
> 1 error generated.
>
> Apparently I need to know, that foo imports bar and create a bar.pcm.
> Otherwise, I can not query the dependencies of foo?!?
>
> Any ideas, how to create dependency files with modules-ts?
>
> Cheers,
> Thorsten
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180515/3efaa674/attachment.html>
More information about the cfe-dev
mailing list