[llvm-dev] Contributing LLD for Mach-O

Fangrui Song via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 4 18:00:20 PST 2020

On 2020-03-03, Dave Lee via llvm-dev wrote:
>Hi Shoaib,
>Has there been any recent discussion with anyone on Apple's side? Is there
>a way forward that results in a single unified open source linker? If not
>at the start, how would it work if they later want to take maintainership?
>Have you thought about a compatibility test suite? If so, I'm curious what
>the approach will be.
>Also for what it's worth, there's a recent fork of ld64's recent source
>drop, which is optimized for incremental compilation. It also uses non-STL
>data structures, parallelism, and a disk cache. See

% cat llvm-project/lld/CODE_OWNERS.TXT
N: Lang Hames, Nick Kledzik
E: lhames at gmail.com, kledzik at apple.com
D: Mach-O backend

Lang resigned (https://reviews.llvm.org/D75382#1906108) and agreed to delete the existing Mach-O port,
but I think we should also get Nick's confirmation.

>On Fri, Feb 28, 2020 at 1:32 PM Shoaib Meenai via llvm-dev <
>llvm-dev at lists.llvm.org> wrote:
>> Hi all,
>> We’re planning to contribute a new implementation of LLD for Mach-O, using
>> the same design as the COFF and ELF ports. This design has proven to work
>> very well for those ports, and we’re keen to explore it for Mach-O as well.
>> Our work is based on an initial prototype created by Peter Collingbourne
>> and Rui Ueyama.
>> Our initial commit is up for review at https://reviews.llvm.org/D75382.
>> We’ve intentionally stripped down this initial commit as much as possible
>> to ease reviewing; we’ve kept it to the absolute minimum needed to produce
>> and test a working macOS x86-64 executable for that prints “Hello World”
>> via a syscall. We have several short-term follow-ups planned to add
>> important functionality, such as linking against archives, universal
>> binaries, dylibs, and tbd files, performing subsection splitting
>> (atomization), and producing dylibs. The follow-ups should give a good
>> sense of the overall design while still keeping each piece easily
>> reviewable and testable individually. Our end goal is to create a
>> full-featured Mach-O linker, and we’ll be working toward that goal over the
>> next several months (and years, in all likelihood). We’d appreciate
>> feedback and reviews.
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

>LLVM Developers mailing list
>llvm-dev at lists.llvm.org

More information about the llvm-dev mailing list