summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli/lli.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-01-23 19:57:16 +0000
committerAlp Toker <alp@nuanti.com>2014-01-23 19:57:16 +0000
commitce4ab597965906419ad58b710b10a0ec04b551a0 (patch)
tree2480be6504c6f2a64176074fa8e076e6f855a11a /llvm/tools/lli/lli.cpp
parent5930ae6cc2eb1946e7858bd49f1bf602f9c8308e (diff)
downloadbcm5719-llvm-ce4ab597965906419ad58b710b10a0ec04b551a0.tar.gz
bcm5719-llvm-ce4ab597965906419ad58b710b10a0ec04b551a0.zip
Replace the interim lli build fix with something cleaner
Eliminates the LLI_BUILDING_CHILD build hack from r199885. Also add a FIXME to remove code that tricks the tests into passing when the feature fails to work. Please don't do stuff like this, the tests exist for a reason! llvm-svn: 199929
Diffstat (limited to 'llvm/tools/lli/lli.cpp')
-rw-r--r--llvm/tools/lli/lli.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp
index e36d9179584..7e928bebffb 100644
--- a/llvm/tools/lli/lli.cpp
+++ b/llvm/tools/lli/lli.cpp
@@ -17,6 +17,7 @@
#include "llvm/IR/LLVMContext.h"
#include "RemoteMemoryManager.h"
#include "RemoteTarget.h"
+#include "RemoteTargetExternal.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/CodeGen/LinkAllCodegenComponents.h"
@@ -663,21 +664,23 @@ int main(int argc, char **argv, char * const *envp) {
OwningPtr<RemoteTarget> Target;
if (!ChildExecPath.empty()) { // Remote execution on a child process
- if (!RemoteTarget::hostSupportsExternalRemoteTarget()) {
- errs() << "Warning: host does not support external remote targets.\n"
- << " Defaulting to simulated remote execution\n";
- Target.reset(RemoteTarget::createRemoteTarget());
- } else {
- if (!sys::fs::can_execute(ChildExecPath)) {
- errs() << "Unable to find usable child executable: '" << ChildExecPath
- << "'\n";
- return -1;
- }
- Target.reset(RemoteTarget::createExternalRemoteTarget(ChildExecPath));
+#ifndef LLVM_ON_UNIX
+ // FIXME: Remove this pointless fallback mode which causes tests to "pass"
+ // on platforms where they should XFAIL.
+ errs() << "Warning: host does not support external remote targets.\n"
+ << " Defaulting to simulated remote execution\n";
+ Target.reset(new RemoteTarget);
+#else
+ if (!sys::fs::can_execute(ChildExecPath)) {
+ errs() << "Unable to find usable child executable: '" << ChildExecPath
+ << "'\n";
+ return -1;
}
+ Target.reset(new RemoteTargetExternal(ChildExecPath));
+#endif
} else {
// No child process name provided, use simulated remote execution.
- Target.reset(RemoteTarget::createRemoteTarget());
+ Target.reset(new RemoteTarget);
}
// Give the memory manager a pointer to our remote target interface object.
OpenPOWER on IntegriCloud