[PATCH] D97426: [lld-macho] Infer machine type from input files

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 07:31:13 PST 2021


thakis added a comment.

> I think there should be almost no
> overhead in practice, since 1. we'll usually succeed in inferring the type from
> the first file we examine, 2. we're only reading in one page, and 3. this entire
> logic can be bypassed by specifying -arch on the command line.

Hm, 1 isn't true if most files are fat .o files. 2. isn't really true since it's kind of bad for the disk cache to open the first page of every obj and then walk all of them again (especially on spinning disks), and if we believe 3 is the way to go, maybe we should just always require `-arch`? Usually the linker is called through clang anyways, which passes it in.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97426



More information about the llvm-commits mailing list