Hi, I don't think just use gold-plugin even modified is enough for the task of building a whole-program bc file. When we want to build a whole-program bc file by a general solution(I meant that we can use such a method for all kinds of build system),we need not only a gold-plugin to do what llvm-ld does,but also some mechanisms,not a simple trick to modify the env variables,to run ar,ld,ranlib's llvm-counterparts when building. A wrapper which can wraps cc1,ld,ar,ranlib may archieve it.. Nan
zhunan wrote:> Hi, > > I don't think just use gold-plugin even modified is enough for the task > of building a whole-program bc file. > > When we want to build a whole-program bc file by a general solution(I > meant that we can use such a method for all kinds of build system),we > need not only a gold-plugin to do what llvm-ld does,but also some > mechanisms,not a simple trick to modify the env variables,to run > ar,ld,ranlib's llvm-counterparts when building.Binutils 2.20 supports plugins and 'ar' and 'nm' will work with the gold plugin. Not sure about ranlib. Nick
Thank you for the reply,but I meant that when we building,we can not use the native tools such ar and as to process the llvm files,we must have the ability to call llvm-ar and llvm-as instead of the native ones. 在 2009-10-17六的 19:35 -0700,Nick Lewycky写道:> zhunan wrote: > > Hi, > > > > I don't think just use gold-plugin even modified is enough for the task > > of building a whole-program bc file. > > > > When we want to build a whole-program bc file by a general solution(I > > meant that we can use such a method for all kinds of build system),we > > need not only a gold-plugin to do what llvm-ld does,but also some > > mechanisms,not a simple trick to modify the env variables,to run > > ar,ld,ranlib's llvm-counterparts when building. > > Binutils 2.20 supports plugins and 'ar' and 'nm' will work with the gold > plugin. Not sure about ranlib. > > Nick >