Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 10df2ea

Browse files
committedMar 15, 2013
Normalize target triple so that llvm can recognize target os correctly
1 parent 73b253d commit 10df2ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/rustllvm/RustWrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,10 +433,10 @@ LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
433433
Options.EnableSegmentedStacks = EnableSegmentedStacks;
434434

435435
std::string Err;
436-
const Target *TheTarget = TargetRegistry::lookupTarget(triple, Err);
436+
std::string Trip(Triple::normalize(triple));
437437
std::string FeaturesStr;
438-
std::string Trip(triple);
439438
std::string CPUStr("generic");
439+
const Target *TheTarget = TargetRegistry::lookupTarget(Trip, Err);
440440
TargetMachine *Target =
441441
TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr,
442442
Options, Reloc::PIC_,

5 commit comments

Comments
 (5)

bors commented on Mar 15, 2013

@bors
Collaborator

saw approval from graydon
at ILyoan@10df2ea

bors commented on Mar 15, 2013

@bors
Collaborator

merging ILyoan/rust/normalize_triple = 10df2ea into auto

bors commented on Mar 15, 2013

@bors
Collaborator

ILyoan/rust/normalize_triple = 10df2ea merged ok, testing candidate = 2b059c6

bors commented on Mar 15, 2013

@bors
Collaborator

fast-forwarding incoming to auto = 2b059c6

Please sign in to comment.