llvm-ld question

Hi, CLANGers,

I used llvm-ar to package the object files for a program into several libraries, and used “llvm-ld …” trying to link them into a final bc file. But the result file is one with only 192 bytes without any real content. Does llvm-ld only accept object files in the command line?

Thanks,

Rui

I think by default it produces a script that run lli :slight_smile:

Note that llvm-ld never evolved into a real linker and got removed.
You can try a system linker that supports using LLVM. At the moment
those are the Apple liker, bfd ld and gold.