[PATCH] D22773: Modules: add command line option fmodules-disable-diagnostic-validation to disable validation of the diagnostic options when loading the module

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 25 16:42:45 PDT 2016


benlangmuir added a comment.

> the pcm could still be rewritten by a compilation that doesn't use a PCH, and then it would be out of date because of the timestamp instead of the diagnostic options

> 

> "a compilation that doesn't use a PCH", is that a different project? And we have two projects building in parallel? Just to make sure I understand.


Two different projects (or targets, or whatever), but they don't even have to build at the same time.  They just have to share a cache. Suppose you have a project A with a PCH and -fmodules-disable-diagnostic-validation.  Suppose you have another project B that does not use this flag, and does not have a PCH.  With this patch, A and B can share a module cache.

A builds a PCH that depends on some module X -- OK
B builds with -Werror.  Rebuilds X.pcm -- OK

Now suppose we build A again because of some change:  it can't build because X.pcm changed, but we haven't rebuilt the PCH.


https://reviews.llvm.org/D22773





More information about the cfe-commits mailing list