Driver: Resolve program path for "cp" (used as part of transparent gcc
PCH support).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67256 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 11c722e..db9d397 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -62,7 +62,9 @@
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.");