summaryrefslogtreecommitdiffstats
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
commit47ca461c8225d672eca68fb52608f654baecf1e0 (patch)
tree740fb0002dddb50538567be0e5f6adb988fa7b77
parentd2905433321cd9c152e719b51128b20dc6bd24c6 (diff)
downloadbcm5719-llvm-47ca461c8225d672eca68fb52608f654baecf1e0.tar.gz
bcm5719-llvm-47ca461c8225d672eca68fb52608f654baecf1e0.zip
For remote execution, must cd to the executable directory since the exe expects to find a dylib in the CWD ('.').
llvm-svn: 76432
-rw-r--r--llvm/tools/bugpoint/ToolRunner.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/tools/bugpoint/ToolRunner.cpp b/llvm/tools/bugpoint/ToolRunner.cpp
index e6db42a08bd..ef07079af30 100644
--- a/llvm/tools/bugpoint/ToolRunner.cpp
+++ b/llvm/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());
}
OpenPOWER on IntegriCloud