This is an archive of the discontinued LLVM Phabricator instance.

[clang][deps] Simplify function discovering .pcm and .modulemap files
ClosedPublic

Authored by jansvoboda11 on Apr 15 2021, 12:48 AM.

Details

Summary

This patch simplifies (and renames) the appendCommonModuleArguments function.

It no longer tries to construct the command line for explicitly building modules. Instead, it only performs the DFS traversal of modular dependencies and queries the callbacks to collect paths to .pcm and .modulemap files.

This makes it more flexible and usable in two contexts:

  • Generating additional command line arguments for the main TU in modular build. The std::vector<std::string> output parameters can be used to manually generate appropriate command line flags.
  • Generate full command line for a module. The output parameters can be the corresponding parts of CompilerInvocation. (In a follow-up patch.)

Diff Detail

Event Timeline

jansvoboda11 requested review of this revision.Apr 15 2021, 12:48 AM
jansvoboda11 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2021, 12:48 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.Apr 15 2021, 4:09 PM