[PATCH] D116913: [lld-macho] Add --start-lib --end-lib

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 19 11:51:31 PST 2022


jyknight added a comment.

Sorry I didn't see to comment on this before, but I'm also skeptical about introducing a new concept of stateful options to this command-line syntax.

> (b) --start-lib a.o b.o --end-lib conveys more
> information than an alternative design: -objlib a.o -objlib b.o because
> --start-lib makes it clear which objects are in the same conceptual archive.

I don't think this is relevant to this linker -- what flexibility are you imagining it provides? "Conceptual archive" doesn't mean anything to a Mach-O linker, since we don't have the legacy ELF symbol lookup behavior where you need to loop around and search an archive repeatedly to find the proper files to pull into the link.

> (c) -objlib/-filelist interaction may be weird.

Filelist can _only_ contain files, no options, so I don't see how this is an advantage of --start-lib? Also, the use of -filelist should be considered deprecated -- passing the args directly to Clang, via a clang @ response-file if needed, is preferable in every way.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116913



More information about the llvm-commits mailing list