[PATCH] D102665: [llvm-objcopy] Add support for '--' for delimiting options from input/output files

Sergey Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 18 03:03:42 PDT 2021


sdmitriev updated this revision to Diff 346086.
sdmitriev marked an inline comment as done.
sdmitriev added a comment.

I agree that it would be better to create a single LIT test for a file name beginning with dash, but it is not clear how to write it. I assume such test would require use of %T (directory of a %t), but according to the documentation it is deprecated now. So, I decided to follow the same strategy for testing this patch as was used in a similar llvm-rc change (D56743 <https://reviews.llvm.org/D56743>) - updating few arbitrary tests to use ‘--’ separator for the file names. If you have ideas how to write a test for a file name beginning with ‘-‘, please share.

> Is there a particular reason you've singled out llvm-objcopy, and not llvm-strip?

No, no particular reason. I only needed this to be supported in llvm-objcopy, so I’ve changed this tool only. But I can prepare a similar change for llvm-strip as well in a separate patch.


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

https://reviews.llvm.org/D102665

Files:
  llvm/test/tools/llvm-objcopy/COFF/add-section.test
  llvm/test/tools/llvm-objcopy/COFF/set-section-flags.test
  llvm/test/tools/llvm-objcopy/ELF/add-section.test
  llvm/test/tools/llvm-objcopy/ELF/set-section-flags.test
  llvm/test/tools/llvm-objcopy/MachO/add-section-32.test
  llvm/test/tools/llvm-objcopy/MachO/add-section-64.test
  llvm/test/tools/llvm-objcopy/wasm/add-section.test
  llvm/tools/llvm-objcopy/CopyConfig.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102665.346086.patch
Type: text/x-patch
Size: 23381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210518/57f5f97f/attachment.bin>


More information about the llvm-commits mailing list