================
@@ -1307,6 +1307,9 @@ void ModuleMap::setInferredModuleAllowedBy(Module *M,
 
 std::error_code
 ModuleMap::canonicalizeModuleMapPath(SmallVectorImpl<char> &Path) {
+  FileManager &FM = SourceMgr.getFileManager();
+  FM.makeAbsolutePath(Path);
----------------
benlangmuir wrote:

> The canonical module map path would now be absolute. Previously, we'd 
> generate relative paths for module maps found through a relative search 
> paths, or besides includers that themselves were found through a relative 
> path.

Yes, this change is what I'm concerned about.

> I'd be curious about the use-case for this, can you elaborate? Is it being 
> able to reuse the same invocation in directories with different paths, 
> potentially on different machines?

My understanding is that this can be used to make the .pcms and command-lines 
to build them portable across machines, e.g. for caching builds in tools like 
bazel.  I don't know how much overlap there is between this use case and using 
the dependency scanner.

Maybe we can flip it around: where exactly do we need an absolute path with 
your changes?

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

Reply via email to