forked from OSchip/llvm-project
[BuildingAJIT] Use the remote target triple to construct the TargetMachine in
Chapter 5. Chapter 5 demonstrates remote JITing: code is executed on the remote, not the machine running the REPL, so it's the remote's triple (and TargetMachine) that we need. llvm-svn: 284657
This commit is contained in:
parent
db46b7d217
commit
1009b0b30f
|
@ -87,7 +87,8 @@ public:
|
|||
typedef decltype(OptimizeLayer)::ModuleSetHandleT ModuleHandle;
|
||||
|
||||
KaleidoscopeJIT(MyRemote &Remote)
|
||||
: TM(EngineBuilder().selectTarget()),
|
||||
: TM(EngineBuilder().selectTarget(Triple(Remote.getTargetTriple()), "",
|
||||
"", SmallVector<std::string, 0>())),
|
||||
DL(TM->createDataLayout()),
|
||||
CompileLayer(ObjectLayer, SimpleCompiler(*TM)),
|
||||
OptimizeLayer(CompileLayer,
|
||||
|
|
Loading…
Reference in New Issue