OSDN Git Service

use getHostTriple instead of getDefaultTargetTriple in getClosestTargetForJIT
[android-x86/external-llvm.git] / lib / Support / TargetRegistry.cpp
index 53c8d84..7497bfe 100644 (file)
@@ -84,7 +84,7 @@ void TargetRegistry::RegisterTarget(Target &T,
 }
 
 const Target *TargetRegistry::getClosestTargetForJIT(std::string &Error) {
-  const Target *TheTarget = lookupTarget(sys::getDefaultTargetTriple(), Error);
+  const Target *TheTarget = lookupTarget(sys::getHostTriple(), Error);
 
   if (TheTarget && !TheTarget->hasJIT()) {
     Error = "No JIT compatible target available for this host";