Is there a way for compile a file in llvm (*.ll) that uses functions in C?
I created a test using check C and I compile it as:
$clang counter_i.c counter_test_check.c -lcheck
This way, I am using the libraries from check, but I need produce the llvm code that uses the library from check. When I try this command:
$clang -S -emit-llvm counter_i.c counter_test_check.c
and try execute the code:
$lli-mp-3.5 counter_test_check.ll
I receive this answer:
LLVM ERROR: Program used external function 'srunner_create' which could not be resolved!
I think that a solution is do something as:
$clang -S -emit-llvm counter_i.c counter_test_check.c -lcheck
But it is not supported.
I am thinking that a similar answer is available at:LLVM JIT-compiled program cannot find external functions