[cfe-dev] Intros, C++ modules, and Facebook

Louis Brandy via cfe-dev cfe-dev at lists.llvm.org
Fri Oct 23 10:28:29 PDT 2015


Hi cfe-dev,

My name is Louis Brandy and I work at Facebook. I’ve begun working on
getting clang modules setup in our C++ codebase. Mostly the purpose of
this email is just to introduce myself and let people know what we’re
doing and our motivation, but I’ve also brought a handful of newbie
questions. I’ve gotten the basic integrations into the build system and
have some core projects building modularly. To get this far, I hacked
together a highly unprincipled set of module maps for glibc, libstdc++.
I’m at the point, now, where I need “real” module maps for our std/system
headers. 

First, is there any prior art re: glibc and libstdc++ module maps? I don’t
want to repeat any work that’s already been done, and my google-fu failed.

Second, I’m interested in the workflow of actually incrementally adding
module maps to a large codebase. I do understand the need to start at the
bottom but I’m worried about proper coverage, and then prioritizing what
to do next. In particular, I find myself really wanting a “summary” of
what #includes did and did not magically become imports so I can use that
to make sure 1) I’ve not missed anything “below” and 2) to prioritize what
to do next (by e.g. aggregating over a build the most textually included
headers). I don’t think such a diagnostic/remark exists? I’ve not looked
too deeply, yet, at clang-modularize, so perhaps my answers lie over
there? 

On a final note, it’s been remarkably easy to get modules up and running
so kudos to everyone who’s gotten it this far.

-Louis



More information about the cfe-dev mailing list