Pass the resolved lli-child-target executable name to execv, rather than
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 2 Oct 2013 21:33:12 +0000 (21:33 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 2 Oct 2013 21:33:12 +0000 (21:33 +0000)
searching $PATH for it then blindly executing it from $PWD anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191856 91177308-0d34-0410-b5e6-96231b3b80d8

tools/lli/lli.cpp

index 05bf4ec19130d92ee72488bb65d3e45f7b95c80e..1cdd91b6938b8298a8dd8ad7e8f7fa8774eed1ea 100644 (file)
@@ -536,7 +536,7 @@ int main(int argc, char **argv, char * const *envp) {
           errs() << "Unable to find child target: '\''" << MCJITRemoteProcess << "\'\n";
           return -1;
         }
-        Target.reset(RemoteTarget::createExternalRemoteTarget(MCJITRemoteProcess));
+        Target.reset(RemoteTarget::createExternalRemoteTarget(ChildEXE));
       }
     } else {
       // No child process name provided, use simulated remote execution.