summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/TargetSelect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/ExecutionEngine/TargetSelect.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/TargetSelect.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/TargetSelect.cpp b/llvm/lib/ExecutionEngine/TargetSelect.cpp
index e6679cfb7f7..b10d51f6486 100644
--- a/llvm/lib/ExecutionEngine/TargetSelect.cpp
+++ b/llvm/lib/ExecutionEngine/TargetSelect.cpp
@@ -30,7 +30,7 @@ TargetMachine *EngineBuilder::selectTarget() {
// MCJIT can generate code for remote targets, but the old JIT and Interpreter
// must use the host architecture.
- if (WhichEngine != EngineKind::Interpreter && M)
+ if (UseMCJIT && WhichEngine != EngineKind::Interpreter && M)
TT.setTriple(M->getTargetTriple());
return selectTarget(TT, MArch, MCPU, MAttrs);
@@ -89,7 +89,8 @@ TargetMachine *EngineBuilder::selectTarget(const Triple &TargetTriple,
}
// FIXME: non-iOS ARM FastISel is broken with MCJIT.
- if (TheTriple.getArch() == Triple::arm &&
+ if (UseMCJIT &&
+ TheTriple.getArch() == Triple::arm &&
!TheTriple.isiOS() &&
OptLevel == CodeGenOpt::None) {
OptLevel = CodeGenOpt::Less;
OpenPOWER on IntegriCloud