[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

Iain Sandoe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 10 00:16:00 PDT 2022


iains added a comment.

@ChuanqiXu BTW, I think we (unfortunately) have some overlap in work in progress here;

I have implemented a similar scheme to GCC's where C/BMIs can be produced "on demand" when the FE encounters the module keywords.  The idea was to make it possible to have the same command lines on both compilers (basically to remove the need for the user to identify that a c++ source is is modular - with the sole exception of header units which the compiler cannot figure out on its own).

This scheme interfaces with the module-mapper approach (but how the mapping is determined could just as easily be from command line flags, module map files etc. etc. that is the beauty of that approach - the compiler has no need to know about how the mapping is made - it can be a fixed in-process scheme (like using the module cache path + some well-known mapping of names) or a full-blown build system - e.g. attaching to build2 (I think Boris did try out an earlier version of my implementation.)

draft patches (need rebasing) here: D118896 <https://reviews.llvm.org/D118896>, D118898 <https://reviews.llvm.org/D118898>,D118895 <https://reviews.llvm.org/D118895>, D118899 <https://reviews.llvm.org/D118899> (these do not include the libCody stuff, which would support the module mapper, but concentrate on the compiler side).

Reworking/rebasing this scheme and posting the patches is next on my TODO after (current work on) P1815 <https://reviews.llvm.org/P1815> part 2.

Hopefully, there is some way to combine these pieces of work to give the user greatest flexibility.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134267/new/

https://reviews.llvm.org/D134267



More information about the cfe-commits mailing list