Normalize target triple so that llvm can recognize target os correctly

This commit is contained in:
ILyoan 2013-03-13 20:50:49 +09:00
parent 73b253dc80
commit 10df2ea9db

View File

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