From 207b6abad40835f1f8a05a3050a5731c86c9b953 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Wed, 19 Oct 2016 22:41:03 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284657 91177308-0d34-0410-b5e6-96231b3b80d8 --- examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h index b122386ff65..f11f0369c42 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h @@ -87,7 +87,8 @@ public: typedef decltype(OptimizeLayer)::ModuleSetHandleT ModuleHandle; KaleidoscopeJIT(MyRemote &Remote) - : TM(EngineBuilder().selectTarget()), + : TM(EngineBuilder().selectTarget(Triple(Remote.getTargetTriple()), "", + "", SmallVector())), DL(TM->createDataLayout()), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, -- 2.50.0