Skip to content

Commit 10df2ea

Browse files
committed
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

+2-2
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_,

0 commit comments

Comments
 (0)