Normalize target triple so that llvm can recognize target os correctly
This commit is contained in:
parent
73b253dc80
commit
10df2ea9db
1 changed files with 2 additions and 2 deletions
|
@ -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_,
|
||||
|
|
Loading…
Reference in a new issue