[LLVMdev] [LLVM] What has happened to LLVM bitcode archive support?

Daniel Liew daniel.liew at imperial.ac.uk
Fri Dec 20 02:39:50 PST 2013


Hi Rafael and other LLVM devs,

I'm currently upgrading a project that uses LLVM that links a bitcode
archive (a C library) with a module. Originally we used
Linker::LinkInFile() but that was removed by r172749. So I started
looking for an alternative and I found
Archive::findModulesDefiningSymbols() which looked very promising as
it would allow me to very easily implement linking a bitcode archive
with a module efficiently (i.e. only call Linker::LinkModules() on the
relevant bitcode modules inside the bitcode archive).

Before I started I thought I'd better check that this API was still
going to be available in the upcoming 3.4 release and to my dismay
``llvm/Bitcode/Archive.h`` was moved by you in r184083 and finally
removed by you in r186197.

So...

* Is LLVM completely moving away from the idea have bitcode archive
runtime libraries? The LLVM Make build system seems to support
building these but LLVM doesn't seem to have an API for linking
runtime bitcode archives into a bitcode module any more (or have I
missed something?). I have seen suggestions of using the LLVM gold
plug-in but that's not an API I can use, is it?

* I'm guessing I'm supposed to use the Object/Archive.h interface now?
This doesn't seem provide a nice interface for getting the set of
Modules I want to link with, so what am I supposed to do instead?

Any help would be appreciated,

Thanks,
Dan Liew.



More information about the llvm-dev mailing list