[llvm-dev] LLJIT: Help: how to add a archive?
Stefan Gränitz via llvm-dev
llvm-dev at lists.llvm.org
Mon Mar 22 09:59:34 PDT 2021
Also, you might want to try it with lli first:
> lli -jit-kind=orc -extra-archive=legacy_stdio_definitions.lib
HelloWorld.ll
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.
Cheers
On 22/03/2021 09:52, Geoff Levner via llvm-dev wrote:
> Hi Francis,
>
> 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.
>
> Geoff
>
> On Mon, Mar 22, 2021 at 8:37 AM Francis ANDRE via llvm-dev
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>
> Hello everyone
>
> 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:
> legacy_stdio_definitions.lib
>
> HelloWorld.c
> extern int printf(char*, ...);
> int main() {
> printf("Hello World!\n");
> return 0;
> }
>
> What did I miss?
>
> Rdgs
>
> FA
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
--
https://flowcrypt.com/pub/stefan.graenitz@gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210322/70e88a77/attachment.html>
More information about the llvm-dev
mailing list