[cfe-dev] LTO on FreeBSD

Chris Lattner clattner at apple.com
Tue Jun 29 23:35:51 PDT 2010


On Jun 29, 2010, at 11:18 PM, Erik Cederstrand wrote:

> 
> Den 30/06/2010 kl. 00.14 skrev David Chisnall:
> 
>> On 29 Jun 2010, at 23:05, SKL wrote:
>> 
>>> What is the OS X version finding and using that the FreeBSD version isn't? I see mention on the llvm site of compiling and using the ld gold plugins, but that appears to be more for llvm-gcc than clang.
>> 
>> 
>> Exactly that.  The FreeBSD linker does not support LTO.  Gold is GPLv3, so is unlikely to ever make it into the FreeBSD base system.  If you want to use LTO on FreeBSD, then you have to do it manually, via llvm-link + opt + llc.  So far, no one has been sufficiently motivated to make the clang driver able to do this itself.
> 
> What about llvm-ld? Should it not be useable as a linker on FreeBSD?

llvm-ld is half-baked at best, it doesn't know a lot of options that your system linker does.  It may work for simple things, but probably not for largish real world programs.

-Chris



More information about the cfe-dev mailing list