I have mylib.c
file which has some functions. I want to use those functions from my .c
file as external ones in compiled llvm code. I'm playing with LLVM interpreter (lli-4.0
) and I wonder how can I tell lli
to use functions from my .c
file?
Asked
Active
Viewed 1,191 times
3

Stanislav Pankevich
- 11,044
- 8
- 69
- 129

vrom911
- 694
- 1
- 5
- 16
2 Answers
6
lli
has a -load
argument so you compile your C file to a dynamic library and then just do
lli -load path-to-your-dynamic-library ....

Stanislav Pankevich
- 11,044
- 8
- 69
- 129
1
lli
supports the following args,
-extra-module
for loading bitcode modules-extra-object
for loading object files-extra-archive
for loading static libs.

droptop
- 1,372
- 13
- 24