[PATCH] D97426: [lld-macho] Infer machine type from input files
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 25 11:56:25 PST 2021
int3 added a subscriber: smeenai.
int3 added a comment.
Hmm good point about #1, I wasn't sure how common fat binary builds were but @smeenai pointed out that with the introduction of M1 <https://reviews.llvm.org/M1> they're going to be more likely. Re #2, I think the same issue plagues LLD-ELF, at least if my mental model of the disk cache is right: even though it doesn't `mmap` the input files twice, it checks the machine type by reading the first page, then goes back later and reads in the rest of the file, which results in similar disk cache effects. But you do make a good point about this not being a super useful feature given that LLD is not typically invoked directly... this just saves us some boilerplate in tests for questionable code complexity.
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