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

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Dec 20 09:13:02 PST 2013


> Could I just note (for the record) there is/are [at least one ;)] bare-metal targets that have neither static nor dynamic linkers.
>
> We have one such (out-of-tree) target and make use of llvm-link to link bitcode - the linked bit code is translated directly into the executable.  We would, however, welcome a solution that allowed the 'link' to be extended to include bitcode archives.
>
> However, it's probably a non-starter (project constraints) to implement a static linker solely for this purpose.

You can probably use the gold plugin with all inputs being IR flies
and passing the plugin the emit-llvm option. That way you get a real
linker doing the resolution of what get fetched from the archives and
still get a IR file in the end.

It will be cleaner with llvm-ar+lld once the support is finish, but
the gold plugin should work today.

Cheers,
Rafael



More information about the llvm-dev mailing list