[PATCH] Add an LTO interface to parse metadata and extract linker options

Nick Kledzik kledzik at apple.com
Tue Jan 14 18:43:53 PST 2014


On Jan 14, 2014, at 4:16 PM, Reid Kleckner <rnk at google.com> wrote:

> On Tue, Jan 14, 2014 at 3:54 PM, Nick Lewycky <nlewycky at google.com> wrote:
>   A Module more or less corresponds to a single .o file, which makes storing
>   properties like linker flags a bit unusual. (This is true regardless of whether
>   you make it a first class property or use named metadata.) Could you explain
>   why it belongs here?
> 
> Unusual for ELF, but both MachO and COFF apparently have places to store linker flags.  So, we have to float that through LLVM's Module.  =/

FYI, this is a new feature in Xcode5 called “auto linking”.  It only works with dynamic libraries.  So, there is no potential the chaos that pulling in archives (which can pull in archives) can lead to.  

That also means the xcode linker will not need this new API to libLTO because libLTO (when merging and compiling bit-code to mach-o) can just produce a mach-o file with the load commands that tells the linker which dynamic libraries to link with.

-Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140114/7e724ec6/attachment.html>


More information about the llvm-commits mailing list