about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorKelly Wilson <wilsonk@cpsc.ucalgary.ca>2011-07-01 00:56:49 -0600
committerKelly Wilson <wilsonk@cpsc.ucalgary.ca>2011-07-01 00:56:49 -0600
commit1e4f198a1d94e82530456334fe90abd5bfc470b6 (patch)
tree1c961ee971b09049998de16dab776d782c4b45ca /src/rustllvm/RustWrapper.cpp
parentb4465aca5ab22447dde52a4a7083d6e3d29e56e2 (diff)
downloadrust-1e4f198a1d94e82530456334fe90abd5bfc470b6.tar.gz
rust-1e4f198a1d94e82530456334fe90abd5bfc470b6.zip
Update RustWrapper.cpp so that LLVM revision 134231 from June 30, 2011 at 22:15 GMT, works.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 110eb9a3bff..819b3e0f080 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -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;