[all-commits] [llvm/llvm-project] 7e4883: [llvm-ranlib] Change -v (alias for --version) to -V

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Apr 5 09:24:34 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e4883f8881bfaea30996c4e846369fbf0b4b549
      https://github.com/llvm/llvm-project/commit/7e4883f8881bfaea30996c4e846369fbf0b4b549
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M llvm/docs/ReleaseNotes.rst
    M llvm/test/tools/llvm-ranlib/help-message.test
    M llvm/tools/llvm-ar/llvm-ar.cpp

  Log Message:
  -----------
  [llvm-ranlib] Change -v (alias for --version) to -V

-V prints the version information in both BSD and GNU ar/ranlib.

BSD ranlib rejects -v while -v enables verbose output in GNU ar but is
another alias for --version in GNU ranlib. The GNU ranlib behavior is
inconsistent: `ranlib -v` is different from `ar -sv`. But it's not a
major concern in practice:

* Users typically use ranlib solely for creating archive symbol tables,
  and they don't need verbose output.
* Verbose output in ranlib seems a no-op.
* GNU ar creates an archive symbol table by default. Many ranlib uses
  have been eliminated.
* Modern linkers like lld/ELF (since version 14) and mold don't rely on
  archive symbol tables anymore.

https://reviews.llvm.org/D71554 introduced -v. This patch removes it so
that `llvm-ranlib -v` and `llvm-ranlib -version` lead to errors (GNU
ranlib rejects `-version` as well). -V is added as an alias for
--version.

Close #87654

Pull Request: https://github.com/llvm/llvm-project/pull/87661



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list