From fcfd6e7c798f621f40a3ccf5dd8a7f1b130fdfd4 Mon Sep 17 00:00:00 2001 From: Luqman Aden Date: Thu, 8 Aug 2013 22:16:00 -0400 Subject: rustc: Add --target-cpu flag to select a more specific processor instead of the default, 'generic'. --- src/rustllvm/RustWrapper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rustllvm/RustWrapper.cpp') diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 04c062072d6..e47ed82c281 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, -- cgit 1.4.1-3-g733a5