diff options
| author | ILyoan <ilyoan@gmail.com> | 2013-03-13 20:50:49 +0900 |
|---|---|---|
| committer | ILyoan <ilyoan@gmail.com> | 2013-03-15 15:39:58 +0900 |
| commit | 10df2ea9db79d7ce69f9c48fbf03565e2581f28c (patch) | |
| tree | c6a1ce42bd5607b37c777ed93f4eb3b0d8c466c0 /src/rustllvm/RustWrapper.cpp | |
| parent | 73b253dc800efe9fa73edfed4663d175b667129b (diff) | |
| download | rust-10df2ea9db79d7ce69f9c48fbf03565e2581f28c.tar.gz rust-10df2ea9db79d7ce69f9c48fbf03565e2581f28c.zip | |
Normalize target triple so that llvm can recognize target os correctly
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 12b305720cc..1b3c1f6e581 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -433,10 +433,10 @@ LLVMRustWriteOutputFile(LLVMPassManagerRef PMR, Options.EnableSegmentedStacks = EnableSegmentedStacks; std::string Err; - const Target *TheTarget = TargetRegistry::lookupTarget(triple, Err); + std::string Trip(Triple::normalize(triple)); std::string FeaturesStr; - std::string Trip(triple); std::string CPUStr("generic"); + const Target *TheTarget = TargetRegistry::lookupTarget(Trip, Err); TargetMachine *Target = TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr, Options, Reloc::PIC_, |
