[clang] [clang] Canonicalize absolute paths in dependency file (PR #117458)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 4 01:50:59 PST 2025


xtexChooser wrote:

what you said is also a problem. maybe we should print both raw path and resolved path?

If the path is not resolved, Make and Ninja will canonicalize these paths without resolving directory symbolic-links in the path, which may lead to a broken path.
As the example I have given above, `/lib64/../xxx.h` may be converted into `/xxx.h` and lead to broken caches.

It is also true that these build tools have their own performance concerns, while canonicalizing a large number of paths may be slow. Doing this in LLVM can make the process a one-time job (if the file is not modified). Thus, I think we need another change to print original non-canonicalized path, too.

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


More information about the cfe-commits mailing list