Gold plugin for LLVM 3.3

I built LLVM and used it, now I want to add a Gold plugin to use as a linker, I just followed "build gold with plugin support" on the LLVM website and now I have ld-new but I don't want to rebuild LLVM agian, is there a way to add this plugin without restoring LLVM?

+3


source to share


1 answer


I am posting my solution there is no way to use the golden plugin without having to recompile LLVM. If you don't want to change anything in the root directory, you can compile and install binutils and LLVM in the same location, which automatically generates ld, ar and as (not ld_new) in the bin directory, and since llvm first looks for its own to find tools (clang -print-search-dirs) so you can make sure clang will call ld gold first at link time. Its not mentioned in LLVMgold.html, but it needs to create a bfd-plugins directory in lib and install both LLVMgold.so and linLTO.so there.



0


source







All Articles