[PATCH] D129176: [ORC][LLJIT] Enable ClaimWeakHiddenSymbols option in PPC64 environment.

Sunho Kim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 01:26:36 PDT 2022


sunho created this revision.
sunho added reviewers: lhames, sgraenitz, v.g.vassilev.
Herald added subscribers: StephenFan, shchenz, hiraditya.
Herald added a project: All.
sunho requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This fixes "JIT session error: Symbols not found: [ DW.ref.__gxx_personality_v0 ]" error which happens when exception is used.


https://reviews.llvm.org/D129176

Files:
  llvm/lib/ExecutionEngine/Orc/LLJIT.cpp


Index: llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
===================================================================
--- llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
+++ llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
@@ -745,6 +745,11 @@
     Layer->setAutoClaimResponsibilityForObjectSymbols(true);
   }
 
+  if (S.JTMB->getTargetTriple().getArch() == Triple::ArchType::ppc64 ||
+      S.JTMB->getTargetTriple().getArch() == Triple::ArchType::ppc64le) {
+    Layer->setAutoClaimResponsibilityForWeakHiddenSymbols(true);
+  }
+
   // FIXME: Explicit conversion to std::unique_ptr<ObjectLayer> added to silence
   //        errors from some GCC / libstdc++ bots. Remove this conversion (i.e.
   //        just return ObjLinkingLayer) once those bots are upgraded.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129176.442462.patch
Type: text/x-patch
Size: 746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220706/36c298f0/attachment.bin>


More information about the llvm-commits mailing list