================
@@ -350,13 +353,105 @@ void
DependencyFileGenerator::outputDependencyFile(DiagnosticsEngine &Diags) {
}
std::error_code EC;
- llvm::raw_fd_ostream OS(OutputFile, EC, llvm::sys::fs::OF_TextWithCRLF);
- if (EC) {
- Diags.Report(diag::err_fe_error_opening) << OutputFile << EC.message();
- return;
- }
- outputDependencyFile(OS);
+ // merge host dependency file (*.d.host)
+ // to kernel dependency file (*.d.host) for tops target
+ llvm::StringRef SubStr = ".host";
+ SmallString<128> OutputFileS(OutputFile);
+ size_t Pos = OutputFileS.find(SubStr);
+ // for tops target, trim .host in dep file
+ if (Pos != llvm::StringRef::npos) {
+ auto ndf = OutputFileS.substr(0, Pos);
----------------
zhouronghua wrote:
I see, i will update it.
https://github.com/llvm/llvm-project/pull/119513
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits