<div dir="ltr">I'd be interested in the existence of a high-quality, open-source, portable linker for apple platforms, but not enough to help make that happen.<div><br></div><div><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">If I _was_ gonna work on something related to that, I'd probably be inclined to instead add any required features to allow an ELF linker to target a notional darwin-elf target, and to have clang emit darwin-elf object files, and then write a binary converter to convert the emitted ELF binary to a Mach-O binary, so that it can actually run on a platform that exists rather than the platform I'd prefer to exist. But that's probably just me being crazy, and I'm not going to work on it. :)</span><br style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br class="gmail-Apple-interchange-newline"></div><br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 5, 2018 at 11:19 AM Andrew Kelley via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Are you planning on working on LLD? <br><br></div>Over here in the Zig frontend, we've been relying on LLD Mach-O support but at some point we'll have to either maintain LLD or write a Mach-O linker in zig. So far we've been making it work with this hacky patch: <a href="https://github.com/ziglang/zig/commit/1ba6e1641a4c5ea1d0d665fe500c9c66d69443a4" target="_blank">https://github.com/ziglang/zig/commit/1ba6e1641a4c5ea1d0d665fe500c9c66d69443a4</a><br><br></div>If nobody else cares about the LLD Mach-O code, then we'll be better off doing the work in zig but if others are interested then it may be more beneficial for the community to work together on the LLD codebase.<br><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 4, 2018 at 7:06 PM, Brian Gesiak via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello all,</div><div><br></div><div>I'm trying to better understand the state of Mach-O support in lld.</div><div><br></div><div>The lld docs state that "the linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS) and WebAssembly in descending order of completeness." [1] True to that statement, I found an email on this list from Jan 2018 stating that "<span style="color:rgb(0,0,0);white-space:pre-wrap">MachO support in lld is not really ready for real world usage.  It was able to bootstrap itself a couple of years ago, but, it has not really been maintained or further developed since." [2] And on</span><font color="#000000"><span style="white-space:pre-wrap"> LLVM Bugzilla, a comment on one bug states "indeed the macOS version seems to be experimental, and not to support LTO at all for the moment.</span></font><span style="white-space:pre-wrap;color:rgb(0,0,0)">" [3]</span></div><div><span style="white-space:pre-wrap;color:rgb(0,0,0)"><br></span></div><div><font color="#000000"><span style="white-space:pre-wrap">I'm curious if anyone has more information on what else Mach-O support in lld is missing. From the above links, I'm aware of a lack of support for LTO. I also encountered the same Clang driver bugs as mentioned on that Bugzilla report. Besides that, I can see a few memory leaks and incorrect links have been reported on Bugzilla as well. [4]</span></font></div><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">Is there anything else that lld developers might be aware of? What work needs to be done before ld64.lld is considered complete?</span></font></div><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">Thanks in advance for any information you can send my way! :)</span></font></div><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">- Brian Gesiak</span></font></div><div><br></div><div>[1] <a href="https://lld.llvm.org" target="_blank">https://lld.llvm.org</a></div><div>[2] <a href="http://lists.llvm.org/pipermail/llvm-dev/2018-January/120216.html" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/2018-January/120216.html</a></div><div>[3] <a href="https://bugs.llvm.org/show_bug.cgi?id=32175" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=32175</a></div><div>[4] <a href="https://bugs.llvm.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=MachO&list_id=139976&product=lld&query_format=advanced&resolution=---&resolution=LATER&resolution=REMIND" target="_blank">https://bugs.llvm.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=MachO&list_id=139976&product=lld&query_format=advanced&resolution=---&resolution=LATER&resolution=REMIND</a></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div></div></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>