https://github.com/benlangmuir commented:

Sorry for being slow to look at this in more detail:

> When generating a PCH map the original directory to some fake directory. You 
> could imagine D:/Foo being mapped to Z:/Foo for instance.

Can you clarify what this means? Is `Z:/Foo` a virtual-only path or does it 
actually exist on disk? In your test case both directories exist, which I 
assume wouldn't normally be the case (or else why not build in the desired 
location directly?).

If the goal is to put virtual paths in the PCH so that you can map them 
somewhere else in the consuming compiler's VFS, does the`RedirectingFileSystem` 
setting `'use-external-names': false` do what you need? The idea behind that 
setting is that we would use the virtual paths everywhere in the compiler 
instead of translating them to the external/on-disk path. I don't have a lot of 
experience with enabling that in modules/pch so maybe there's something that it 
doesn't handle.

https://github.com/llvm/llvm-project/pull/106577
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to