This is an archive of the discontinued LLVM Phabricator instance.

[clang][deps] Don't emit `-fmodule-map-file=`
ClosedPublic

Authored by jansvoboda11 on Nov 9 2021, 2:10 AM.

Details

Summary

During explicit modules build, when all modules are provided via -fmodule-file=<path> and implicit modules and implicit module maps are disabled (-fno-implicit-modules, -fno-implicit-module-maps), we don't need to load the original module map files at all. This patch stops emitting the -fmodule-map-file= arguments we don't need, saving some compilation time due to avoiding parsing such module maps and making the command line shorter.

Diff Detail

Event Timeline

jansvoboda11 requested review of this revision.Nov 9 2021, 2:10 AM
jansvoboda11 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 9 2021, 2:10 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
jansvoboda11 edited the summary of this revision. (Show Details)Nov 9 2021, 2:13 AM
bnbarham accepted this revision.Nov 9 2021, 2:23 AM

That was quick! Seems reasonable to me -hopefully there's not some strange case where this wouldn't work, will be nice to avoid the parsing time (which actually isn't insignificant).

This revision is now accepted and ready to land.Nov 9 2021, 2:23 AM
This revision was automatically updated to reflect the committed changes.