I've been playing with LLVM more and ran into a wall trying to do this:
Assuming I have the bitcode of a project (input.bc
), I can compile that to an object file (input.o
) using llc
.
Now if I write a separate file (funcdefs.c
) that uses some symbol definitions which are in input.o
, is it possible to compile funcdefs.c
to its own IR representation using input.o
as an include?
I've tried clang -c -emit-llvm input.o funcdefs.c
but I don't see anything that looks like it's finding the missing symbol/global definitions.
Thank you for any guidance!