[PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 9 16:29:36 PDT 2016

rsmith added a subscriber: rsmith.
rsmith added a comment.

This doesn't seem like quite the right user interface for this feature. The module cache is volatile, and it's not really reasonable for people to assume they know what is and isn't within it. Instead, it seems like what we want to provide is zero or more paths to directories containing prebuilt .pcm files whose file names are the same as their top-level module names, completely separate from the module cache.

Specifically, rather than spelling this as `-fmodules-use-prebuilt-modules -fmodules-cache-path=X`, I'd suggest spelling it as `-fprebuilt-module-path=X` or similar (which can be repeated to provide multiple search paths). That would then combine orthogonally with `-fno-implicit-modules` and `-fno-implicit-module-maps`, where implicit modules would still use the module cache. Does that make sense for your use case?

You're also missing updates to the modules documentation.


More information about the cfe-commits mailing list