about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index db353036336..7f2e61092ee 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -372,6 +372,7 @@ extern "C" bool
 LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
                         LLVMModuleRef M,
                         const char *triple,
+                        const char *cpu,
                         const char *feature,
                         const char *path,
                         TargetMachine::CodeGenFileType FileType,
@@ -401,7 +402,7 @@ LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
   std::string Err;
   std::string Trip(Triple::normalize(triple));
   std::string FeaturesStr(feature);
-  std::string CPUStr("generic");
+  std::string CPUStr(cpu);
   const Target *TheTarget = TargetRegistry::lookupTarget(Trip, Err);
   TargetMachine *Target =
     TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr,