llvm.org GIT mirror llvm / de9aea9
[llvm-objcopy] - Report "no zlib available" error properly when --compress-debug-sections is used. If zlib is not available, and --compress-debug-sections is passed, we want to report an error. Currently, it is only reported for --compress_debug_sections= form of the option. Fixes the https://bugs.llvm.org/show_bug.cgi?id=40886. I do not think there is a way to write a test for this. Differential revision: https://reviews.llvm.org/D58909 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355391 91177308-0d34-0410-b5e6-96231b3b80d8 George Rimar 7 months ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
475475 InputArgs.getLastArgValue(OBJCOPY_compress_debug_sections_eq)
476476 .str()
477477 .c_str());
478 if (!zlib::isAvailable())
479 return createStringError(
480 errc::invalid_argument,
481 "LLVM was not compiled with LLVM_ENABLE_ZLIB: can not compress");
482478 }
479 if (!zlib::isAvailable())
480 return createStringError(
481 errc::invalid_argument,
482 "LLVM was not compiled with LLVM_ENABLE_ZLIB: can not compress");
483483 }
484484
485485 Config.AddGnuDebugLink = InputArgs.getLastArgValue(OBJCOPY_add_gnu_debuglink);