================
@@ -666,13 +666,19 @@ static StringRef 
makeAbsoluteAndPreferred(CompilerInstance &CI, StringRef Path,
 }
 
 void ModuleDepCollector::addFileDep(StringRef Path) {
-  llvm::SmallString<256> Storage;
-  Path = makeAbsoluteAndPreferred(ScanInstance, Path, Storage);
+  // Within P1689 format, we don't want all the paths to be absolute path
+  // since it may violate the tranditional make style dependencies info.
+  if (!IsStdModuleP1689Format) {
+    llvm::SmallString<256> Storage;
+    Path = makeAbsoluteAndPreferred(ScanInstance, Path, Storage);
+  }
   FileDeps.push_back(std::string(Path));
----------------
ChuanqiXu9 wrote:

Done. Thanks for your catch!

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

Reply via email to