[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:04:33 PDT 2021


sdmitriev added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/CopyConfig.cpp:486
 
-  if (InputArgs.size() == 0) {
+  if (InputArgs.size() == 0 && DashDash == RawArgsArr.end()) {
     printHelp(T, errs(), ToolType::Objcopy);
----------------
jhenderson wrote:
> What about the case where a user does `llvm-objcopy --` with no arguments or input files? What does GNU objcopy do in this case?
GNU objcopy prints help in this case. I have updated this change to match GNU objcopy behavior:

`llvm-objcopy --` => print help
`llvm-objcopy -- <file>` => empty output


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

https://reviews.llvm.org/D102665



More information about the llvm-commits mailing list