[cfe-dev] [Modules TS] feedback

Boris Kolpackov via cfe-dev cfe-dev at lists.llvm.org
Sat May 13 03:40:50 PDT 2017


Hi Richard,

Richard Smith <richard at metafoo.co.uk> writes:

> The intent is that the same set of flags would typically be passed to a
> compilation building the module interface for a particular module as would
> be passed to a compilation building the module interface.

Should the second "module interface" be "module user (importer)"?


> That way, the user can decide on a per-module basis how they want the
> compiler to act (including things like which warnings they want enabled
> for their module, and perhaps some details of the language it's written in).

Interesting. So this implies that the module binary interface (.pcm) is
a user-side (or per-user) thing, not module-side?

In other words, if I have library libx that implements modx and I have
two programs, exe1 and exe2, that use/link this module/library, then,
I may need to generate two modx.pcm versions, one for each exe if they
are built with different-enough flags (actually, three: +1 for libx's
module implementation units).

This makes sense if you start thinking about inline functions, warnings,
etc. But definitely not how I (and I bet a lot of other people) think
about it.

I also wonder how this model applies to the standard library? Will each
project that consumes it as a module have to compile its module interface?


Thanks,
Boris



More information about the cfe-dev mailing list