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

Stefan Gränitz via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 23 08:37:31 PDT 2021


Author: Stefan Gränitz
Date: 2021-03-23T16:37:15+01:00
New Revision: d9069dd9b5763f72a9ce11aaab1c9ab4f9bf282d

URL: https://github.com/llvm/llvm-project/commit/d9069dd9b5763f72a9ce11aaab1c9ab4f9bf282d
DIFF: https://github.com/llvm/llvm-project/commit/d9069dd9b5763f72a9ce11aaab1c9ab4f9bf282d.diff

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

Next attempt to prevent PowerPC/s390x/etc. failures when landing D98931.

Added: 
    

Modified: 
    llvm/tools/lli/lli.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp
index 32df0711f2fd..1bfd4b82632e 100644
--- a/llvm/tools/lli/lli.cpp
+++ b/llvm/tools/lli/lli.cpp
@@ -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);


        


More information about the llvm-commits mailing list