Normalize target triple so that llvm can recognize target os correctly
This commit is contained in:
@@ -433,10 +433,10 @@ LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
|
|||||||
Options.EnableSegmentedStacks = EnableSegmentedStacks;
|
Options.EnableSegmentedStacks = EnableSegmentedStacks;
|
||||||
|
|
||||||
std::string Err;
|
std::string Err;
|
||||||
const Target *TheTarget = TargetRegistry::lookupTarget(triple, Err);
|
std::string Trip(Triple::normalize(triple));
|
||||||
std::string FeaturesStr;
|
std::string FeaturesStr;
|
||||||
std::string Trip(triple);
|
|
||||||
std::string CPUStr("generic");
|
std::string CPUStr("generic");
|
||||||
|
const Target *TheTarget = TargetRegistry::lookupTarget(Trip, Err);
|
||||||
TargetMachine *Target =
|
TargetMachine *Target =
|
||||||
TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr,
|
TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr,
|
||||||
Options, Reloc::PIC_,
|
Options, Reloc::PIC_,
|
||||||
|
|||||||
Reference in New Issue
Block a user