about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorILyoan <ilyoan@gmail.com>2013-03-13 20:50:49 +0900
committerILyoan <ilyoan@gmail.com>2013-03-15 15:39:58 +0900
commit10df2ea9db79d7ce69f9c48fbf03565e2581f28c (patch)
treec6a1ce42bd5607b37c777ed93f4eb3b0d8c466c0 /src/rustllvm/RustWrapper.cpp
parent73b253dc800efe9fa73edfed4663d175b667129b (diff)
downloadrust-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.cpp4
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_,