mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
Normalize target triple so that llvm can recognize target os correctly
This commit is contained in:
parent
73b253dc80
commit
10df2ea9db
@ -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 New Issue
Block a user