[clang] [clang] Accept mtime change for input files of relocatable PCH (PR #196057)

Arseniy Zaostrovnykh via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 10 00:07:19 PDT 2026


necto wrote:

> If you want relocatable PCHs, I'd suggest not storing the input file modification times in the first place and at all and instead storing & comparing the contents hash. Clang already has flags for this: `-fno-pch-timestamp`, `-fvalidate-ast-input-files-content`.

This is what I ended up doing in the end. It introduces a slight overhead of computing and comparing file hashes, but it is acceptable in my use case. I still think it would make sense to ignore mtime for relocatable PCH, as this is what I expected based on the name of the property, but I don't want to keep an open PR, and I have a way forward without it.

https://github.com/llvm/llvm-project/pull/196057


More information about the cfe-commits mailing list