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.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_,