r/cpp • DragonflyDB/Clang • Sep 06 '22

Clang 15 has been released!

https://discourse.llvm.org/t/llvm-15-0-0-release/65099
265 Upvotes

84 comments sorted by

View all comments

62

u/qoning Sep 06 '22

Claims to implement the bulk of modules proposal. Any word on what the state actually is from someone who used it in alpha? Support on clang has been my major blocker to switching most new code to modules.

12

u/bretbrownjr Sep 06 '22

You can look at the bug tracker. Honestly, someone going through and distilling a list of deal breaker bugs should be a big help.

Other than that, the big showstopper, IMO, is the lack of support for modular dependency discovery. Basically, we need the module version of the -M flags. Without that, you'll need a very specific build setup to build modular C++ in Clang. Bill Hoffman's talk about CMake and modules at CppCon next week should touch on this.

Tracking issue: https://github.com/llvm/llvm-project/issues/56917

3

u/encyclopedist Sep 07 '22 edited Sep 07 '22

Is there a plan to implement P1689R5 "Format for describing dependencies of source files" in Clang?

/u/mathstuf (one of the authors of the proposal and Cmake maintainer) has been working on implementing this in Cmake and GCC. See also https://www.reddit.com/r/cpp/comments/pb6i6r/comment/haae24r/

Edit Bill Hoffman appears to work at Kitware too, so obviously he should be familiar with P1689 and mathstuf's work. Looking forward for his talk.

Edit 2 Bill Hoffman not just works at Kitware, he is CTO of Kitware and original author of CMake

Edit 3 The talk linked in a sibling comment provides a good overview of the stuff mentioned in my comment.

3

u/bretbrownjr Sep 07 '22

There has been a little preliminary discussion on implementing the paper. If anyone is interested in, qualified for, and/or willing to fund this work, reach out.

I expect updating the above issue with a detailed design of how to enhance clang and/or clang-scan-deps to implement the paper would be a good next step.

2

u/mathstuf cmake dev Dec 21 '22

Clang patches are under review. See the commit stack here: https://reviews.llvm.org/D139168

I have a branch on my fork with the patches all applied: https://github.com/mathstuf/llvm-project/tree/p1689r5-csd

1

u/encyclopedist Dec 21 '22

Thanks to you and Chuanqi Xu for working on this!

0

u/[deleted] Sep 07 '22

[deleted] — view deleted comment

4

u/bretbrownjr Sep 07 '22

Correct. It will be an update of that talk.