[libcxx-commits] [libcxx] [libc++] First attempt to regroup a few modules in the modulemap (PR #98214)
Vassil Vassilev via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 11 23:56:28 PDT 2024
vgvassilev wrote:
I am wondering what prevents us from wrapping all of the content of the modulemap into a `module std {`. We do this [here](https://github.com/root-project/cling/blob/master/include/cling/std_darwin.modulemap) and we ship it with practically all versions of osx. It mostly works across versions of libcxx/xcode. The problem is that we need to update it every time a private header is added or goes away. The other problem is that in theory we should have such a modulemap per release of libcxx, which does not scale very well. That was the motivation I had in mind when opening https://github.com/llvm/llvm-project/issues/86193.
Although I do not see a point in having separate pcm files for each header, I see two solutions that can restore piece in our software galaxy:
* Preferably, wrap everything in a single module -- here we have two options. We can keep the current modulemap for the CI and only do the wrapping at release. That's somewhat safe because if the former works the latter should be guaranteed to work too.
* Less preferably, we can have two versions of that modulemap. One called `module.modulemap` with the current design the other called `std.modulemap` in which cmake cuts and pastes the content of `module.modulemap` into a `module std { export *` construct. This way users who want a single module can instruct clang to use `std.modulemap`.
What do you think?
https://github.com/llvm/llvm-project/pull/98214
More information about the libcxx-commits
mailing list