[PATCH] D58909: [llvm-objcopy] - Report "no zlib available" error properly when --compress-debug-sections is used.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 02:05:18 PST 2019


grimar added a comment.

In D58909#1418102 <https://reviews.llvm.org/D58909#1418102>, @jhenderson wrote:

> In D58909#1418084 <https://reviews.llvm.org/D58909#1418084>, @grimar wrote:
>
> > In D58909#1417023 <https://reviews.llvm.org/D58909#1417023>, @jhenderson wrote:
> >
> > > Can you write a test that is UNSUPPORTED if zlib IS available?
> >
> >
> > I think we have such a test already. It is:
> >  https://github.com/llvm-mirror/llvm/blob/master/test/tools/llvm-objcopy/ELF/compress-debug-sections-invalid-format.test
> >  (It does not do `# REQUIRES: zlib` because code report the `Invalid or unsupported --compress-debug-sections format` error before `zlib::isAvailable()` check.
> >  What looks fine to me.)
>
>
> That isn't the same test as I meant. That checks the error message at line 475, whereas I'm looking for a test for line 483. In other words, a valid compression format, but where `zlib::isAvailable` fails. It may not be possible of course.


Yes, as I mentioned in the description I do not think it is possible. FWIW in LLD we do not check this error either.


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

https://reviews.llvm.org/D58909





More information about the llvm-commits mailing list