llvm-link Patch

Hello,

I’m working on a project that involves archive files and since llvm-link does not currently support them, I have a simple patch (attached) to add this functionality. It isn’t really efficient (it recomputes the set of symbols that need to be linked in after each link), and it probably has some problems with append linkage, but so far it has been enough for me.

I’d like to clean this up and commit it back to llvm. Would someone like to tell me how to proceed?

Thanks.

link-archives.patch (7.91 KB)

Hello,

I'm working on a project that involves archive files and since llvm-link
does not currently support them, I have a simple patch (attached) to add
this functionality. It isn't really efficient (it recomputes the set of
symbols that need to be linked in after each link), and it probably has
some problems with append linkage, but so far it has been enough for me.

I'd like to clean this up and commit it back to llvm. Would someone like
to tell me how to proceed?

llvm-link is a very simple developer's tool. Can you use llvm-ld or a
system linker that supports LLVM IL?

Thanks.

Cheers,
Rafael

For my application it is important that I get bit code out the other end and I couldn’t get the linux linker to link llvm. Is there a way to do this with other tools? I noticed a TODO in the llvm-link.cpp file that said that this should be done so I figured that that would be the right place to do it.

2011/7/30 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>

The gold plugin can do this. The same plugin should also work with
recent versions of the regular gnu linker. See

http://llvm.org/docs/GoldPlugin.html

for general instructions. To write a bc file the plugin option you
want is emit-llvm.

Cheers,
Rafael

Hi Rafael,

I'm working on a project that involves archive files and since llvm-link
does not currently support them, I have a simple patch (attached) to add
this functionality. It isn't really efficient (it recomputes the set of
symbols that need to be linked in after each link), and it probably has
some problems with append linkage, but so far it has been enough for me.

I'd like to clean this up and commit it back to llvm. Would someone like
to tell me how to proceed?

llvm-link is a very simple developer's tool.

I don't see why it shouldn't support LLVM archives though.

Ciao, Duncan.

  Can you use llvm-ld or a

llvm-link-which-supports-archives is called "llvm-ld -link-as-library".

-Eli

If this is the case, is there ever a reason to use llvm-link as opposed to llvm-ld?