[libcxx-commits] [libcxx] [libc++][modules] Rewrite the modulemap to have fewer top-level modules (PR #107638)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 17 08:00:41 PDT 2024
ldionne wrote:
> > > @ldionne, thank you for your efforts. This is a step in the direction where we would like to be. Do you plan further simplification of the modulemap and switching to even less modules?
> >
> >
> > If we can, yes. I'd like to investigate umbrella headers to simplify the maintenance of the modulemap, but if you have other suggestions for simplifications and improvements I'd be all ears since I don't know what else we could do.
>
> I think umbrella headers would help us reduce the size of the modulemap and help with removal/addition of header files.
I agree.
> Another super useful thing would be to introduce a CI check which essentially enforces self-contained header files -- every header file should be able to compile on its own. For instance, `cat header.h header.h | gcc -fsyntax-only -xc++ -`. This command concatenates header.h twice before compiling it to make sure it has proper include protectors and compiles on its own. Once our codebase becomes compliant to this simple rules we can do pretty much what we want in the modulemap.
We already have basically that: [libcxx/test/libcxx/clang_modules_include.gen.py](https://github.com/llvm/llvm-project/blob/main/libcxx/test/libcxx/clang_modules_include.gen.py)
Are you thinking about something slightly different?
https://github.com/llvm/llvm-project/pull/107638
More information about the libcxx-commits
mailing list