[ELF] Make -V an alias for -v
authorFangrui Song <i@maskray.me>
Wed, 21 Sep 2022 00:12:44 +0000 (17:12 -0700)
committerFangrui Song <i@maskray.me>
Wed, 21 Sep 2022 00:12:44 +0000 (17:12 -0700)
commit06010fd1be3d816fdbbb53f75a26902c02b6f111
treec188aef9087eb7d233f8a10af8bdfef3e86a3dab
parentbd6e018472452a72ca36408ae43caf349b1c1b27
[ELF] Make -V an alias for -v

In GNU ld,

* --version skips linker input processing.
* -v and -V keep processing if there is any input file. -V has more
  information we don't support.

We currently make -V an alias for --version which skips input processing.
On many `*-freebsd` and `powerpc-*` targets, `gcc -v` passes `-V` to ld
and expects to process input. Make -V an alias for -v to provide
compatibility.

Fix https://github.com/llvm/llvm-project/issues/57859
lld/ELF/Options.td
lld/docs/ld.lld.1
lld/test/ELF/version.test