3

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?

4

2 回答 2

6

lli有一个-load参数,因此您将 C 文件编译为动态库,然后执行

lli -load path-to-your-dynamic-library ....
于 2017-05-25T20:34:34.873 回答
1

lli支持以下参数,

  • -extra-module用于加载位码模块
  • -extra-object用于加载目标文件
  • -extra-archive用于加载静态库。
于 2021-01-31T13:49:25.587 回答