[cfe-dev] [RFC] Open sourcing and contributing TAPI back to the LLVM community

Greg Parker via cfe-dev cfe-dev at lists.llvm.org
Mon Apr 9 15:39:28 PDT 2018


> On Apr 9, 2018, at 3:23 PM, James Y Knight via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> I'm not really clear on the actual benefits of the TBD file, and why Apple migrated to them in the first place. Shouldn't a dynamic library containing only the relevant parts (e.g. the dynamic symbol table) be roughly comparable in size? And, much simpler to support? I assume that's effectively what "Mach-O Dynamic Library Stubs" actually _were_, before the introduction of TBD files, so presumably there were good reasons for switching?

File size is one reason. A TBD file is typically one third the size of the corresponding stub library for a single architecture. Multiple architectures dramatically increase the TBD advantage: a new architecture in TBD may cost as little as a few bytes if all architectures export the same functions, but each new architecture in a stub library requires duplicating its entire contents.


-- 
Greg Parker     gparker at apple.com     Runtime Wrangler




More information about the cfe-dev mailing list