<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Dibyendu,<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">I updated my project to LLVM 10.0 today and I am getting JIT symbol resolution errors.<br>I could not find any example or updated tutorial or documentation that describes the new api - as all documentation seems out of date.</blockquote><div><br></div><div>The doxygen comments should be up-to-date, as should <a href="http://llvm.org/docs/ORCv2.html">http://llvm.org/docs/ORCv2.html</a>. You can find up-to-date example code for LLJIT in llvm/examples/LLJITExamples (LLVM 10) or llvm/examples/OrcV2Examples (master). If you come across any documentation in master that appears to be out of date please let me know and I will fix it.</div><div><br></div><div>The BuildingAJIT tutorial series is known to be out of date. I'm hoping to have that fixed by LLVM 11 but there is some feature work that I need to complete first.</div><div><br></div><div>Can you share the specific errors that you're getting back? I would recommend replacing</div><div><br></div><div><font face="monospace">cantFail(callToFailingFunc(...));</font></div><div><br></div><div>with</div><div><br></div><div><font face="monospace">logAllUnhandledErrors(callToFailingFunc(...), errs(), "callToFailingFunc(...) failed:");</font></div><div><br></div><div>Regards,</div><div>Lang.</div><div><br></div></div></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 13, 2020 at 10:06 AM Dibyendu Majumdar <<a href="mailto:mobile@majumdar.org.uk" target="_blank">mobile@majumdar.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I updated my project to LLVM 10.0 today and I am getting JIT symbol<br>
resolution errors.<br>
I could not find any example or updated tutorial or documentation that<br>
describes the new api - as all documentation seems out of date.<br>
<br>
I paste below some code snippets that show what I am doing:<br>
<br>
/* global syms is a array mapping names to function addresses */<br>
<br>
ES->createJITDylib("<main>");<br>
MainJD = ES->getJITDylibByName("<main>");<br>
MainJD->addGenerator(<br>
    cantFail(llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess(<br>
        DL->getGlobalPrefix())));<br>
auto &JD = *MainJD;<br>
llvm::orc::MangleAndInterner mangle(*ES, *this->DL);<br>
llvm::orc::SymbolMap Symbols;<br>
for (int i = 0; global_syms[i].name != nullptr; i++) {<br>
  Symbols.insert({mangle(global_syms[i].name),<br>
<br>
llvm::JITEvaluatedSymbol(llvm::pointerToJITTargetAddress(global_syms[i].address),<br>
<br>
llvm::JITSymbolFlags(llvm::JITSymbolFlags::FlagNames::Absolute))});<br>
}<br>
llvm::cantFail(JD.define(llvm::orc::absoluteSymbols(Symbols)), "Failed<br>
to install extern symbols");<br>
<br>
FYI - my previous post on similar issue.<br>
Basically I haven't been able to get ORC v2 working - tried in 8, 9 and now 10.<br>
<br>
<a href="http://llvm.1065342.n5.nabble.com/llvm-dev-ORC-v2-question-tp130489p130601.html" rel="noreferrer" target="_blank">http://llvm.1065342.n5.nabble.com/llvm-dev-ORC-v2-question-tp130489p130601.html</a><br>
<br>
Thanks and Regards<br>
Dibyendu<br>
</blockquote></div>
</div></div></div>