-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Continue fixing recent regression in clang modules support in libc++ #124893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-clang-modules Author: Vassil Vassilev (vgvassilev)
Since years we have had a single top-level module for `std` in libc++ and it worked flawlessly for years.
Now libc++ decided to move to a single module per header file which generated hundred of modules. The reason is unclear to me but some contributors mentioned that using We have made some progress in going back to where we were years ago with #86193 and a few related issues. As a matter of fact ldionne@6bd36bf reports significant performance improvements:
My suggestion was (and still is) to move back to a single module consisting of multiple submodules. There is no fundamental reason why we would not be able to do so, unfortunately, all discussion so far said it was not possible and refused to elaborate and share a reproducing example where we can help with our clang modules expertise. This is a critical problem for the entire community and we are stuck and I do not understand why. cc: @zygoloid, @Bigcheese, @ldionne, @ChuanqiXu9. |
The reason why a single monolithic module doesn't work is that it creates a cycle with the underlying system headers when those are modularized as well. For example:
Given this, including However, the platform's underlying In other words, a cycle The headers in this example are fictional, but you get the point. This has been explained before at least a few times and I don't understand what's unclear or mysterious about this explanation. I also don't understand why libc++'s current modulemap definition is causing breakage at every release for you. If you can explain that in simple terms, that's definitely something we can try addressing assuming your use-case is valid. In the PR you linked, I see that Cling defines its own |
Well, that's the part of the misunderstanding. In this fictional example tagging the definition of module
Can you elaborate on "we can't reasonably support"? We had to introduce this separate modulemap just to bring back the single module file setup, as we redistribute the module files. That basically is something we need to patch with each sdk you guys release. Part of the reason is that in the modulemap we have private files which then disappear and so on... I think our use-case request is pretty simple. Move all libc++-related headers into a single top-level module consisting of multiple submodules. The |
Since years we have had a single top-level module for
std
in libc++ and it worked flawlessly for years.Now libc++ decided to move to a single module per header file which generated hundred of modules. The reason is unclear to me but some contributors mentioned that using
no_undeclared_includes
to resolve issues with non-modular headers was a workaround. I've humbly disagreed with that statement because it is a feature designed to resolve such setups. The downside of moving towards this is we penalize downstream clients whose workflows break with every release now (see root-project/root#16494)We have made some progress in going back to where we were years ago with #86193 and a few related issues. As a matter of fact ldionne@6bd36bf reports significant performance improvements:
My suggestion was (and still is) to move back to a single module consisting of multiple submodules. There is no fundamental reason why we would not be able to do so, unfortunately, all discussion so far said it was not possible and refused to elaborate and share a reproducing example where we can help with our clang modules expertise.
This is a critical problem for the entire community and we are stuck and I do not understand why.
cc: @zygoloid, @Bigcheese, @ldionne, @ChuanqiXu9.
The text was updated successfully, but these errors were encountered: