diff options
| author | bors <bors@rust-lang.org> | 2013-08-11 20:50:14 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-08-11 20:50:14 -0700 |
| commit | 1785841a5b8d33f13a7d90495213ce67c41b680e (patch) | |
| tree | e74a1c6f43b1e714de1bdda3c729538aaf89b8c9 /src/rustllvm/RustWrapper.cpp | |
| parent | 0679436381a57898ca7def194102ecd6f9709673 (diff) | |
| parent | fcfd6e7c798f621f40a3ccf5dd8a7f1b130fdfd4 (diff) | |
| download | rust-1785841a5b8d33f13a7d90495213ce67c41b680e.tar.gz rust-1785841a5b8d33f13a7d90495213ce67c41b680e.zip | |
auto merge of #8410 : luqmana/rust/mcpu, r=sanxiyn
Adds `--target-cpu` flag which lets you choose a more specific target cpu instead of just passing the default, `generic`. It's more or less akin to `-mcpu`/`-mtune` in clang/gcc.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 3 |
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, |
