This is an archive of the discontinued LLVM Phabricator instance.

[clang][deps] Always use -fmodules-validate-once-per-build-session
Needs ReviewPublic

Authored by jansvoboda11 on May 10 2023, 3:23 PM.

Details

Summary

The dependency scanner assumes immutable file system. In that context, we don't need to repeatedly validate PCM input files. This patch avoids that by using the existing -fmodules-validate-once-per-build-session mechanism.

Depends on D150318.

Diff Detail

Event Timeline

jansvoboda11 created this revision.May 10 2023, 3:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 10 2023, 3:23 PM
Herald added a subscriber: ributzka. · View Herald Transcript
jansvoboda11 requested review of this revision.May 10 2023, 3:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 10 2023, 3:23 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
benlangmuir added inline comments.May 10 2023, 3:49 PM
clang/lib/Tooling/DependencyScanning/DependencyScanningService.cpp
26

I'm not sure this is guaranteed to line up with the filesystem timestamps. I wonder if you should be writing a file and reading back that stamp instead.

clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
188

Why would it diagnose? This is going to be common. Maybe we should use the minimum value between the service and the existing timestamp to get the widest possible session if the build system is already providing one?