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

Benifits of TBD:

  1. It’s human readable and diffs on TBDs correspond to changes in the ABI. Diffs can be automatically added to review processes to ensure that changes to the ABI are reviewed. The TBDs also document your precise ABI.
  2. The size is smaller which means they can be shipped in an SDK instead of binaries to reduce the size of an SDK

I’m still skeptical that this is significant.

For Apple it certainly is, mostly because TBDs can support multiple architectures in a much more efficient way than fat images do. Apple has a lot of architecture/SDK variants with a lot of redundancy between what libraries export on different platforms.

John.

Sound great :slight_smile:

The code on opensource.apple.com is the minimal code needed for libtapi to read TBD files with ld64. The code I pushed to GitHub on the other side includes the full TAPI tool source code. If you check the code you will see that I already use the LLVM license for everything, because the goal has always been to contribute this back to the community.

I attached an initial patch for libtapi and nm support to my original email. I also have some updated patches for that too, but somehow got derailed into “lets rewrite libobject” discussions.

Was there any progress in the upstreaming effort? I’d be interested in having lld be able to link against tbd files, and I think it’d be cool if libtool -static could write tbd files (similar to thin archives on linux) since that should make archiving much faster.

Juergen, maybe uploading your initial patch to phabricator instead of attaching might get more traction?

A member of my team +Armando Montanez is going to drop a proposal for the ELF part of this soon (like sometime next week) and will be working on the implementation. I’ll be one of the reviewers for anything that comes out of that so we can be sure it will get reviewed as well. The goal is to have a single tool/library that would include Juergen’s original code and the new ELF code.

Great to hear, thanks!

This is great to hear. Please add Steven Wu and me as reviewers. Unfortunately I won’t be available for the next weeks, because I am on my honeymoon, but I would like a chance to review the code once I am back.

Thanks

Cheers,
Juergen

Awesome, having reviewers puts us ahead of the curve! I’m quite excited for this to make it in.

Add me too please, I’ve got an area I’d like to investigate along with it and keeping track via reviews is awesome :slight_smile:

(and I’m happy to at least do small llvm style reviews on it and then let Juergen or Steven do the final review)