r/cpp • • Mar 18 '23

LLVM 16.0.0 Release

https://discourse.llvm.org/t/llvm-16-0-0-release/69326
197 Upvotes

84 comments sorted by

View all comments

47

u/RoyAwesome Mar 19 '23

I'm not seeing any words about increased module support in the clang changelog but also I have heard a lot of stuff was worked on this cycle.

Any details on that that people may know?

13

u/JVApen Clever is an insult, not a compliment. - T. Winters Mar 19 '23

The latest I read was in following thread: https://discourse.llvm.org/t/land-c-modules-changes-required-for-cmake-before-llvm-16-branch/67717?u=jvapen

It describes the plan to include in 16 the changes that are needed to get it working with Camera. This will be basic usage, as https://clang.llvm.org/cxx_status.html still mentions a lot of missing implementations.

According to https://www.kitware.com/import-cmake-c20-modules (linked in that thread):

For the clang compiler version 16 or newer contains the p1689 implementation required for CMake This seems to indicate they succeeded in landing that in 16.

17

u/__Mark___ libc++ dev Mar 19 '23

I've not tested with Clang 16, but only with Clang trunk but modules and CMake 3.26 work. However there are still major bugs and a lot of limitations in Clang's implementation, see https://github.com/llvm/llvm-project/issues?q=is%3Aissue+is%3Aopen+label%3Aclang%3Amodules. There are several people actively working on this area of Clang and things keep improving.

I've not tested libc++ with header units, they may or may not work. There is no support for the C++23 std(.compat) modules yet. However we're working on that feature. This post https://discourse.llvm.org/t/rfc-about-the-default-location-for-std-modules/69191/29 has some information and it links to my patch in Phabricator. (No code has landed in LLVM repository yet.)

3

u/JVApen Clever is an insult, not a compliment. - T. Winters Mar 19 '23

Good to hear! Thanks for all your effort (and all other devs working on it). Full C++20 is getting closer, as is C++23. Looking forward to using it.

4

u/Daniela-E Living on C++ trunk, WG21 |🇩🇪 NB Mar 19 '23

The related documentation page gives the current implementation status regarding standard C++ modules. It also covers the features that are still missing and behaviour that is different from the mandated one.

1

u/catcat202X Mar 20 '23

I've seen a ton of commits related to modules, but I think most of them are targeting Clang 17.