diff options
Diffstat (limited to 'contrib/llvm-project/llvm/tools/lli/lli.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/tools/lli/lli.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/contrib/llvm-project/llvm/tools/lli/lli.cpp b/contrib/llvm-project/llvm/tools/lli/lli.cpp index 5f1fd1578764..8a7ea2d3d0c5 100644 --- a/contrib/llvm-project/llvm/tools/lli/lli.cpp +++ b/contrib/llvm-project/llvm/tools/lli/lli.cpp @@ -965,9 +965,12 @@ int runOrcJIT(const char *ProgName) { EPC = ExitOnErr(orc::SelfExecutorProcessControl::Create( std::make_shared<orc::SymbolStringPool>())); - Builder.setObjectLinkingLayerCreator([&EPC, &P](orc::ExecutionSession &ES, - const Triple &TT) { - auto L = std::make_unique<orc::ObjectLinkingLayer>(ES, EPC->getMemMgr()); + Builder.getJITTargetMachineBuilder() + ->setRelocationModel(Reloc::PIC_) + .setCodeModel(CodeModel::Small); + Builder.setObjectLinkingLayerCreator([&P](orc::ExecutionSession &ES, + const Triple &TT) { + auto L = std::make_unique<orc::ObjectLinkingLayer>(ES); if (P != LLJITPlatform::ExecutorNative) L->addPlugin(std::make_unique<orc::EHFrameRegistrationPlugin>( ES, ExitOnErr(orc::EPCEHFrameRegistrar::Create(ES)))); |