Driver: Resolve program path for "cp" (used as part of transparent gcc

PCH support).

llvm-svn: 67256
This commit is contained in:
Daniel Dunbar 2009-03-18 23:34:15 +00:00
parent c4acf9d516
commit 483693941c
1 changed files with 3 additions and 1 deletions

View File

@ -62,7 +62,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
ArgStringList CpArgs;
CpArgs.push_back(InputPath);
CpArgs.push_back(Args.MakeArgString(OutputPath.c_str()));
C.getJobs().addJob(new Command("cp", CpArgs));
const char *Exec =
Args.MakeArgString(getToolChain().GetProgramPath(C, "cp").c_str());
C.getJobs().addJob(new Command(Exec, CpArgs));
}
} else {
assert(isa<CompileJobAction>(JA) && "Invalid action for clang tool.");