[PATCH] D75742: [Object] Support large archive members

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 09:46:38 PDT 2020


jhenderson marked 4 inline comments as done.
jhenderson added a comment.

In D75742#1914799 <https://reviews.llvm.org/D75742#1914799>, @rupprecht wrote:

> In D75742#1912140 <https://reviews.llvm.org/D75742#1912140>, @jhenderson wrote:
>
> > Simplify size handling slightly.
> >
> > I've not deleted the test yet, but I will do so in due course before this gets committed. I'd like to see if we can come up with an alternative test option first, if we can. For the record, the test passes locally with my patch, but didn't without the fix (it was how I found the bug in the first place).
>
>
> I don't know if it's portable (you'd have to add requires for Linux/shell, or maybe do some lit configuration to detect if it's available), but you could try using `fallocate`:
>
>   $ time fallocate -l 3G test.large
>   fallocate -l 3G test.large  0.00s user 0.01s system 39% cpu 0.017 total
>   $ time cat test.large > /dev/null
>   cat test.large > /dev/null  0.01s user 1.18s system 99% cpu 1.193 total
>
>
> If you want to try that, I would still recommend keeping the unit test that runs on all platforms, and just having this lit one be an extra test.


I'm not sure that's going to work. We'll still need an object of the right size in the first place, to punch holes in, as otherwise it won't be a valid linker input, so it doesn't avoid the size issue. Furthermore, I doubt that llvm-ar or LLD will preserve the sparseness, so it won't be useful for testing this or LLD's behaviour.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75742





More information about the llvm-commits mailing list