[libcxx-commits] [libcxx] [libc++] First attempt to regroup a few modules in the modulemap (PR #98214)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 3 10:55:02 PDT 2024
ldionne wrote:
> Thanks for clarifying. Unfortunately that's not a workable solution for us. We would like to have a way to build a single module as per other discussion threads. What would be a way forward to implement that upstream? I still think that we can use cmake to build a std.modulemap file which wraps the content of the default modulemap.
A single module can never work. For example libc++'s `math.h` includes the base system's `math.h` header, but other parts of the system module will include e.g. libc++'s `stddef.h`. So if libc++'s `math.h` and libc++'s `stddef.h` are in the same module, we automatically have a cycle. This doesn't show up unless you have a properly modularized SDK, which might be why this hasn't been a problem for you so far.
While we can't have the C compatibility headers in a single top-level module, I actually don't see why we couldn't have the other libc++ headers in a single top-level module. I think that would be doable.
https://github.com/llvm/llvm-project/pull/98214
More information about the libcxx-commits
mailing list