summaryrefslogtreecommitdiff
path: root/tools/bugpoint/ToolRunner.cpp
diff options
context:
space:
mode:
authorDavid Goodwin <david_goodwin@apple.com>2009-07-20 17:15:03 +0000
committerDavid Goodwin <david_goodwin@apple.com>2009-07-20 17:15:03 +0000
commit91cf36151663543bffcecaf01d4b6dcef2aa0f2b (patch)
tree076ec4ef56319579261298167f3a53c824162fe7 /tools/bugpoint/ToolRunner.cpp
parent83757c7fb51bd60a8c264fba24a0b6f1b01efdd3 (diff)
downloadllvm-91cf36151663543bffcecaf01d4b6dcef2aa0f2b.tar.gz
llvm-91cf36151663543bffcecaf01d4b6dcef2aa0f2b.tar.bz2
llvm-91cf36151663543bffcecaf01d4b6dcef2aa0f2b.tar.xz
For remote execution, must cd to the executable directory since the exe expects to find a dylib in the CWD ('.').
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/ToolRunner.cpp')
-rw-r--r--tools/bugpoint/ToolRunner.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp
index e6db42a08b..ef07079af3 100644
--- a/tools/bugpoint/ToolRunner.cpp
+++ b/tools/bugpoint/ToolRunner.cpp
@@ -688,7 +688,6 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
std::vector<const char*> ProgramArgs;
- std::string Exec;
if (RemoteClientPath.isEmpty())
ProgramArgs.push_back(OutputBinary.c_str());
else {
@@ -704,10 +703,12 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
ProgramArgs.push_back(RemoteExtra.c_str());
}
- // Full path to the binary
+ // Full path to the binary. We need to cd to the exec directory because
+ // there is a dylib there that the exec expects to find in the CWD
char* env_pwd = getenv("PWD");
+ std::string Exec = "cd ";
Exec += env_pwd;
- Exec += "/";
+ Exec += "; ./";
Exec += OutputBinary.c_str();
ProgramArgs.push_back(Exec.c_str());
}