forked from OSchip/llvm-project
Fix MLIR Build after LLVM upstream JIT changes (getMainJITDylib removed)
The getMainJITDylib() method was removed in 4fc68b9b7f
, replace it by creating a JITDylib on the fly.
PiperOrigin-RevId: 283948595
This commit is contained in:
parent
b8cd0c1486
commit
b14ee5a9a1
|
@ -234,9 +234,12 @@ Expected<std::unique_ptr<ExecutionEngine>> ExecutionEngine::create(
|
|||
auto objectLayer = std::make_unique<RTDyldObjectLinkingLayer>(
|
||||
session, []() { return std::make_unique<SectionMemoryManager>(); });
|
||||
auto dataLayout = deserModule->getDataLayout();
|
||||
llvm::orc::JITDylib *mainJD = session.getJITDylibByName("<main>");
|
||||
if (!mainJD)
|
||||
mainJD = &session.createJITDylib("<main>");
|
||||
|
||||
// Resolve symbols that are statically linked in the current process.
|
||||
session.getMainJITDylib().addGenerator(
|
||||
mainJD->addGenerator(
|
||||
cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(
|
||||
dataLayout.getGlobalPrefix())));
|
||||
|
||||
|
|
Loading…
Reference in New Issue