LLVM provides 2 tools llvm-link and llvm-ld. I would like to know:
how merge all .o file in one ?
how set a soname like with gcc -Wl,-soname,libsomething.so.1 ?
I would like do this in c++ but if show to me how do that from command line i will found how do to do in c++.
thanks
llvm-link
is a tool for linking (~ merging) LLVM IR files into another LLVM IR file.llvm-ld
tries to be compatible to ld
. Note that LLVM currently has no real linking capabilities, so llvm-ld
calls gcc
to do the actual final stages.Note that if you just want to have GCC's functionality, use the clang driver:
clang -c file.c -fpic
clang -shared file.o -o file.so
You can also pass the -Wl
flags to clang
as you'd do for gcc
:
clang -shared file.o -Wl,-soname,libfile.so.8 -o file.so
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