Skip to content

Commit 1e4f198

Browse files
committed
Update RustWrapper.cpp so that LLVM revision 134231 from June 30, 2011 at 22:15 GMT, works.
1 parent b4465ac commit 1e4f198

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rustllvm/RustWrapper.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ extern "C" void LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
8585
std::string Err;
8686
const Target *TheTarget = TargetRegistry::lookupTarget(triple, Err);
8787
std::string FeaturesStr;
88-
TargetMachine *Target = TheTarget->createTargetMachine(triple, FeaturesStr);
88+
std::string Trip(triple);
89+
std::string CPUStr = llvm::sys::getHostCPUName();
90+
TargetMachine *Target = TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr);
8991
bool NoVerify = false;
9092
PassManager *PM = unwrap<PassManager>(PMR);
9193
std::string ErrorInfo;

0 commit comments

Comments
 (0)