]> git.lizzy.rs Git - rust.git/commitdiff
Update RustWrapper.cpp so that LLVM revision 134231 from June 30, 2011 at 22:15 GMT...
authorKelly Wilson <wilsonk@cpsc.ucalgary.ca>
Fri, 1 Jul 2011 06:56:49 +0000 (00:56 -0600)
committerKelly Wilson <wilsonk@cpsc.ucalgary.ca>
Fri, 1 Jul 2011 06:56:49 +0000 (00:56 -0600)
src/rustllvm/RustWrapper.cpp

index 110eb9a3bff6a995a3f6a47ef15a94bb1eb0e36d..819b3e0f08029834c84538f646d013aade9ec277 100644 (file)
@@ -85,7 +85,9 @@ extern "C" void LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
   std::string Err;
   const Target *TheTarget = TargetRegistry::lookupTarget(triple, Err);
   std::string FeaturesStr;
-  TargetMachine *Target = TheTarget->createTargetMachine(triple, FeaturesStr);
+  std::string Trip(triple);
+  std::string CPUStr = llvm::sys::getHostCPUName();
+  TargetMachine *Target = TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr);
   bool NoVerify = false;
   PassManager *PM = unwrap<PassManager>(PMR);
   std::string ErrorInfo;