mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Driver] Preserve filelists when a subprocess crashes. (#9849)
This should make it easier to rerun crashed jobs that use filelists; previously you'd have to run the top-level driver command again with -save-temps. I didn't want to save /all/ temporary files because that often includes things like .o files, which could fill up your disk pretty quickly. But we can always tweak this later.
This commit is contained in:
@@ -57,7 +57,7 @@ ToolChain::JobContext::getTemporaryFilePath(const llvm::Twine &name,
|
||||
llvm::report_fatal_error("unable to create temporary file for filelist");
|
||||
}
|
||||
|
||||
C.addTemporaryFile(buffer.str());
|
||||
C.addTemporaryFile(buffer.str(), PreserveOnSignal::Yes);
|
||||
// We can't just reference the data in the TemporaryFiles vector because
|
||||
// that could theoretically get copied to a new address.
|
||||
return C.getArgs().MakeArgString(buffer.str());
|
||||
|
||||
Reference in New Issue
Block a user