Add module dependencies with -MD, -MMD

Ben Langmuir blangmuir at apple.com
Tue Mar 4 21:37:27 PST 2014


Annnnnd I finally got around to updating this patch!

The new patch is simplified to rely on the ASTWriter’s concept of what a ‘system’ dependency is.  To that end, I’ve changed module.map files to no longer be unconditionally ‘user’ files.  Previously we forced module.map to be ‘user’ input files as a cheap way to detect system header changes without ‘stat’ing all the headers.  With Dmitri’s work on a timestamp-file-based approach, we shouldn’t need that trick anymore.

Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: print-module-deps.patch
Type: application/octet-stream
Size: 20126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140304/7db577aa/attachment.obj>
-------------- next part --------------

On Jan 22, 2014, at 4:40 PM, Ben Langmuir <blangmuir at apple.com> wrote:

> This patch adds module dependencies to the dependency files created by -MD/-MMD/etc.  It does so by attaching an ASTReaderListener that will call into the dependency file generator when a module input file is seen in the serialized AST.  In order to add/not add system headers appropriately, the IsSystem flag from the clang::Module is passed through the ASTReader and ModuleFile.  There was also an addition to allow chaining ASTReaderListeners (let me know if you’d prefer that to be a separate patch).
> 
> Ben
> 
> <module-deps.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list