[libcxx-commits] [libcxx] Commit mostly working single wrapped module map (PR #87402)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 5 09:26:22 PDT 2024


EricWF wrote:

> We can't do this. The libc++ public headers all need to be top level modules so that they can layer with the clang and OS modules. https://reviews.llvm.org/D144322 Note that you can't use modules with only the libc++ module map, you'll need a module map to cover your libc headers and the posix headers used by libc++ as well.

We can and have done this. I suspect the issues you're discussing arise on OS X and not Linux?

I have built LLVM with this change using modules, without any special tweaks for libc or POSIX. So this change works perfectly in some configurations.

If you could provide concrete examples of what breaks, I can work to fix those breakages. But without actual meaningful examples, I can't do much to help.

I understand that this patch, exactly as is, might cause issues with C and POSIX headers. And that those issues may require the `foo.h` and `cfoo` headers to be treated slightly differently.

We also can't not do this. When was the last time you built a large project using our module map? It very quickly breaks trying to build Clang with more than one thread. 

So if this change breaks on a Mac, but is required on Linux and visa versa without this change, then I can come up with a separate path forward.


https://github.com/llvm/llvm-project/pull/87402


More information about the libcxx-commits mailing list