mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix response file support for batch jobs.
This commit is contained in:
committed by
Tony Allevato
parent
9a6fa09729
commit
6d7223023d
@@ -363,7 +363,7 @@ void Job::printCommandLine(raw_ostream &os, StringRef Terminator) const {
|
||||
escapeAndPrintString(os, Executable);
|
||||
os << ' ';
|
||||
if (hasResponseFile()) {
|
||||
printArguments(os, {ResponseFileArg});
|
||||
printArguments(os, {ResponseFile->argString});
|
||||
os << " # ";
|
||||
}
|
||||
printArguments(os, Arguments);
|
||||
@@ -419,8 +419,9 @@ void Job::printSummary(raw_ostream &os) const {
|
||||
}
|
||||
|
||||
bool Job::writeArgsToResponseFile() const {
|
||||
assert(hasResponseFile());
|
||||
std::error_code EC;
|
||||
llvm::raw_fd_ostream OS(ResponseFilePath, EC, llvm::sys::fs::F_None);
|
||||
llvm::raw_fd_ostream OS(ResponseFile->path, EC, llvm::sys::fs::F_None);
|
||||
if (EC) {
|
||||
return true;
|
||||
}
|
||||
@@ -438,9 +439,10 @@ BatchJob::BatchJob(const JobAction &Source,
|
||||
const char *Executable, llvm::opt::ArgStringList Arguments,
|
||||
EnvironmentVector ExtraEnvironment,
|
||||
std::vector<FilelistInfo> Infos,
|
||||
ArrayRef<const Job *> Combined, int64_t &NextQuasiPID)
|
||||
ArrayRef<const Job *> Combined, int64_t &NextQuasiPID,
|
||||
Optional<ResponseFileInfo> ResponseFile)
|
||||
: Job(Source, std::move(Inputs), std::move(Output), Executable, Arguments,
|
||||
ExtraEnvironment, Infos),
|
||||
ExtraEnvironment, Infos, ResponseFile),
|
||||
CombinedJobs(Combined.begin(), Combined.end()),
|
||||
QuasiPIDBase(NextQuasiPID) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user