<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Also, you might want to try it with lli first:<br>
<br>
> lli -jit-kind=orc -extra-<span class="pl-s">archive<span
class="pl-pds">=legacy_stdio_definitions.lib HelloWorld.ll<br>
<br>
</span></span>In case it doesn't work, adding --debug-only=orc can
provide a lot of debug output, that can be useful for a first
glimpse what's going on.<br>
<br>
Cheers<br>
<br>
<div class="moz-cite-prefix">On 22/03/2021 09:52, Geoff Levner via
llvm-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAHMBa1ue6AvY6YMyqJUTXFv+wFndtmrcWPikzc2kjtGHJgPOJg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hi Francis,</div>
<div><br>
</div>
<div>You can use the StaticLibraryDefinitionGenerator class to
expose symbols from a static library (archive). You create an
instance using its static Load() method, then add the instance
to the LLJIT by calling JITDylib::addGenerator(). I haven't
tried this on Windows, though.<br>
</div>
<div><br>
</div>
<div>Geoff<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Mar 22, 2021 at 8:37
AM Francis ANDRE via llvm-dev <<a
href="mailto:llvm-dev@lists.llvm.org" moz-do-not-send="true">llvm-dev@lists.llvm.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hello everyone</p>
<p>Unless I misunderstood the class LLJIT, there is no
function to add a archive (.lib on Windows or .a on Linux)
to the instance of LLJIT, but one can only add an object
or a IR module. I am trying to JIT the code below and need
this Windows library: <span style="display:inline"><span>legacy_stdio_definitions.lib</span></span></p>
<font face="monospace"><span style="display:inline"><span>HelloWorld.c</span></span><br>
<span style="display:inline"><span>extern int
printf(char*, ...);</span></span><br>
<span style="display:inline"><span>int main() {</span></span><br>
<span style="display:inline"><span> printf("Hello
World!\n");</span></span><br>
<span style="display:inline"><span> return 0;</span></span><span
style="display:inline"><span></span></span><br>
<span style="display:inline"><span>}</span></span></font>
<p><span style="display:inline"><span><font face="monospace">What
did I miss?</font></span></span></p>
<p><span style="display:inline"><span><font face="monospace">Rdgs</font></span></span></p>
<p><span style="display:inline"><span><font face="monospace">FA</font><br>
</span></span></p>
<p><span style="display:inline"><span><font face="monospace"><br>
</font></span></span></p>
<p><span style="display:inline"><span></span></span></p>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank"
moz-do-not-send="true">llvm-dev@lists.llvm.org</a><br>
<a
href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="https://flowcrypt.com/pub/stefan.graenitz@gmail.com">https://flowcrypt.com/pub/stefan.graenitz@gmail.com</a></pre>
</body>
</html>