This is an archive of the discontinued LLVM Phabricator instance.

[clang][deps] Don't prune search paths used by dependencies
ClosedPublic

Authored by jansvoboda11 on Mar 9 2022, 9:02 AM.

Details

Summary

When pruning header search paths (to reduce the number of modules we need to build explicitly), we can't prune the search paths used in (transitive) dependencies of a module. Otherwise, we could end up with either of the following dependency graphs:

X:<hash1> -> Y:<hash2>
X:<hash1> -> Y:<hash3>

depending on the search paths of the translation unit we discovered X and Y from.

This patch fixes that.

Depends on D121295.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Mar 9 2022, 9:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2022, 9:02 AM
jansvoboda11 requested review of this revision.Mar 9 2022, 9:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2022, 9:02 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dexonsmith accepted this revision.Mar 14 2022, 10:47 AM

LGTM.

clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
31

Note that clang-format wants you to do something here.

This revision is now accepted and ready to land.Mar 14 2022, 10:47 AM
This revision was landed with ongoing or failed builds.Mar 16 2022, 4:18 AM
This revision was automatically updated to reflect the committed changes.