forked from OSchip/llvm-project
Tweak r199835 to use can_execute() instead of exists()
The execution code path crashes if it can't execute the binary so we might as well take precautions here. llvm-svn: 199844
This commit is contained in:
parent
20fcda7162
commit
912d49b106
|
@ -668,8 +668,9 @@ int main(int argc, char **argv, char * const *envp) {
|
|||
<< " Defaulting to simulated remote execution\n";
|
||||
Target.reset(RemoteTarget::createRemoteTarget());
|
||||
} else {
|
||||
if (!sys::fs::exists(ChildExecPath)) {
|
||||
errs() << "Unable to find child target: '" << ChildExecPath << "'\n";
|
||||
if (!sys::fs::can_execute(ChildExecPath)) {
|
||||
errs() << "Unable to find usable child executable: '" << ChildExecPath
|
||||
<< "'\n";
|
||||
return -1;
|
||||
}
|
||||
Target.reset(RemoteTarget::createExternalRemoteTarget(ChildExecPath));
|
||||
|
|
Loading…
Reference in New Issue