[PATCH] D132893: Add docs for Mach-O lld

Michael Eisel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 11:39:44 PDT 2022


michaeleisel added inline comments.


================
Comment at: lld/docs/MachO/index.rst:24-25
+decompressing it, and locating the binary at ``bin/ld64.lld``. Note
+that if ``ld64.lld`` is moved out of ``bin``, it must still be accompanied
+by its sibling file ``lld``.
+
----------------
oontvoo wrote:
> ld64.lld is mostly just a soft link to lld, no? 
Correct


================
Comment at: lld/docs/MachO/index.rst:54
+[rules_apple_linker](https://github.com/keith/rules_apple_linker).
+The user may also need to add ``-Wl,--deduplicate-literals`` in order
+to match Apple's linker behavior more closely.
----------------
oontvoo wrote:
> For future extensibility, how about rewroding this to "The user may need to add a few extra flags to match Apple's LD64. See more details at ..." ?
I think it would be best to have this here as a simple instruction for the user to be able to adopt lld with minimum risk, as opposed to the other doc which goes into much more depth and could be intimidating/harder to get simple action items out of. I think we could add both to here as well as well as in the ld64 vs. lld section if there are any new flags in the future to add here.


================
Comment at: lld/docs/MachO/index.rst:55
+The user may also need to add ``-Wl,--deduplicate-literals`` in order
+to match Apple's linker behavior more closely.
+
----------------
oontvoo wrote:
> smeenai wrote:
> > michaeleisel wrote:
> > > thakis wrote:
> > > > Should this point at…uh,  lld/MachO/ld64-vs-lld.rst.
> > > > 
> > > > Also, we should move  lld/MachO/ld64-vs-lld.rst  out of the source tree into the doc tree, right, @oontvoo?
> > > Sure, how about another sentence saying, "For more details on the differences between ld64 and LLD, see [here](...)"? Although, I don't know what the link is. Also, can I render this somehow locally to see how it looks and if the links work?
> > Make sure you have `sphinx-build` in your path (I've found `pip` to be the easiest way to do this), and then set `LLVM_ENABLE_SPHINX` to `ON` in your CMakeCache.txt and reconfigure, then build the `docs-lld-html` target. It'll take a bit the first time, but incremental builds should be pretty quick. 
> > Should this point at…uh,  lld/MachO/ld64-vs-lld.rst.
> > 
> > Also, we should move  lld/MachO/ld64-vs-lld.rst  out of the source tree into the doc tree, right, @oontvoo?
> 
> Yeah, I think the intention was that we'd keep this ld64-vs-lld.rst here in the source tree until the linker is "officially" released. 
> So now is as good a time as any.
> 
> 
> 
OK, I've moved it


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132893/new/

https://reviews.llvm.org/D132893



More information about the llvm-commits mailing list