[lli] Workaround missing architecture support in LazyCallThroughManager for non-lazy mode

Next attempt to prevent PowerPC/s390x/etc. failures when landing D98931.
This commit is contained in:
Stefan Gränitz 2021-03-23 16:27:40 +01:00
parent 9d45daf465
commit d9069dd9b5
1 changed files with 10 additions and 0 deletions

View File

@ -869,6 +869,16 @@ int runOrcJIT(const char *ProgName) {
.setRelocationModel(codegen::getExplicitRelocModel())
.setCodeModel(codegen::getExplicitCodeModel());
// FIXME: Setting a dummy call-through manager in non-lazy mode prevents the
// JIT builder to instantiate a default (which would fail with an error for
// unsupported architectures).
if (UseJITKind != JITKind::OrcLazy) {
auto ES = std::make_unique<orc::ExecutionSession>();
Builder.setLazyCallthroughManager(
std::make_unique<orc::LazyCallThroughManager>(*ES, 0, nullptr));
Builder.setExecutionSession(std::move(ES));
}
Builder.setLazyCompileFailureAddr(
pointerToJITTargetAddress(exitOnLazyCallThroughFailure));
Builder.setNumCompileThreads(LazyJITCompileThreads);