What is the difference between llvm-ld and llvm-link? I suppose llvm-ld performs link time optimization while llvm-link doesn't. Am I right?
llvm-ld
is a drop-in replacement for the system linker that supports both LLVM bitcode and native code. It produces bitcode executables by default (ie the resulting executable invokes the bitcode interpreter), but can also be used to produced native executables.
I don't use llvm-ld
directly as it's more convenient to use the llvmc
and clang
frontends, which invoke the appropriate programs of the LLVM toolchain as necessary (note: llvmc
was marked experimental and appears to have been removed in the 3.0 release).
llvm-link
is a more low-level tool which joins several bitcode files into a single one. The documentation doesn't mention if it does optimizations, but it doesn't appear to do so. The next optimization passes will be triggered on native code generation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With