I built LLVM and was using it, now I want to add Gold plug-in to use as linker, I just followed "build gold with plugin support" in LLVM website,and now have ld-new but I dont want to rebuild LLVM agian, is there any way to add this plugin without rebuilding LLVM?
Asked
Active
Viewed 871 times
1 Answers
0
well I post my solution there is no way to use gold plug-in without recompiling LLVM. If you don't want to change any thing in root directory, then you can compile and install binutils and LLVM in same place it will automatically generate ld,ar and as (not ld_new) in bin directory and since llvm first looks to its own directory to find tools (clang -print-search-dirs) so you can be sure that clang will invoke ld gold in link time first. Its not mentioned in LLVMgold.html but its needed to create bfd-plugins directory in lib and install both LLVMgold.so and linLTO.so there.

khalil Saedi
- 93
- 1
- 7