[PATCH] D150319: [clang][deps] Always use -fmodules-validate-once-per-build-session

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 10 15:49:56 PDT 2023


benlangmuir added inline comments.


================
Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningService.cpp:26
+              ? BuildSessionTimestamp
+              : std::chrono::system_clock::now().time_since_epoch().count()) {
   // Initialize targets for object file support.
----------------
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.


================
Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp:188
+    // FIXME: Consider diagnosing when this overwrites existing timestamp.
+    ScanInstance.getHeaderSearchOpts().BuildSessionTimestamp =
+        Service.getBuildSessionTimestamp();
----------------
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?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150319/new/

https://reviews.llvm.org/D150319



More information about the cfe-commits mailing list