4 Replies
Hi @Awesome !
Cheerp is currently based on Clang 16, and it does have some level of support for C++ modules.
The example from the quickstart here just works: https://clang.llvm.org/docs/StandardCPlusPlusModules.html#quick-start
That said, there might be some incomplete features. We don't do anything special that concerns modules, so the next time that we update our Clang base, we will automatically gain any improvement done there.
I was more concerned about C++23, which includes std modules as well, although thanks for letting know! Are there any plans of releasing Cheerp with the newer Clang base in the near future?
From what I understand, the compiler support should be there, but libcxx needs to be built with special flags, which we are currently not using.
Even for upstream libcxx, the support is incomplete, and using it requires a special cmake setup: https://libcxx.llvm.org/Modules.html
General build system support for this feature is quite lacking currently.
To answer your question: We will probably rebase on the most recent clang (and libcxx) later this year, and if by then modules look a bit more practically usable, we will consider enabling them for our libcxx build.
Okay, got it, I think it covers my question, thanks!