File tree Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,10 @@ Changes to the LLVM tools
174
174
* llvm-ar now allows specifying COFF archive format with ``--format `` argument
175
175
and uses it by default for COFF targets.
176
176
177
+ * llvm-ranlib now supports ``-V `` as an alias for ``--version ``.
178
+ ``-v `` (``--verbose `` in llvm-ar) has been removed.
179
+ (`#87661 <https://github.com/llvm/llvm-project/pull/87661 >`_)
180
+
177
181
* llvm-objcopy now supports ``--set-symbol-visibility `` and
178
182
``--set-symbols-visibility `` options for ELF input to change the
179
183
visibility of symbols.
Original file line number Diff line number Diff line change 5
5
# RUN: llvm-ranlib -help | FileCheck %s --check-prefix=HELP
6
6
# RUN: llvm-ranlib --help | FileCheck %s --check-prefix=HELP
7
7
# RUN: llvm-ranlib --version | FileCheck %s --check-prefix=VERSION
8
- # RUN: llvm-ranlib -version | FileCheck %s --check-prefix=VERSION
9
- # RUN: llvm-ranlib -v | FileCheck %s --check-prefix=VERSION
8
+ # RUN: llvm-ranlib -V | FileCheck %s --check-prefix=VERSION
10
9
11
10
## Also check combined options (first -h/-v flag wins)
12
11
# RUN: llvm-ranlib -Dh | FileCheck %s --check-prefix=HELP
13
- # RUN: llvm-ranlib -Dvh | FileCheck %s --check-prefix=VERSION
14
- # RUN: llvm-ranlib -Dhv | FileCheck %s --check-prefix=HELP
12
+ # RUN: llvm-ranlib -DVh | FileCheck %s --check-prefix=VERSION
13
+ # RUN: llvm-ranlib -DhV | FileCheck %s --check-prefix=HELP
15
14
16
15
# HELP: USAGE: llvm-ranlib
17
16
# VERSION: version
17
+
18
+ ## -v enables verbose output in BSD ranlib and GNU ar but is another alias
19
+ ## for --version in GNU ranlib. Reject -v.
20
+ # RUN: not llvm-ranlib -v 2>&1 | FileCheck %s --check-prefix=ERR1
21
+ # RUN: not llvm-ranlib -version 2>&1 | FileCheck %s --check-prefix=ERR2
22
+ # RUN: not llvm-ranlib -Dvh 2>&1 | FileCheck %s --check-prefix=ERR3
23
+
24
+ # ERR1: error: Invalid option: '-v'
25
+ # ERR2: error: Invalid option: '-version'
26
+ # ERR3: error: Invalid option: '-vh'
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ static void printRanLibHelp(StringRef ToolName) {
65
65
<< " USAGE: " + ToolName + " archive...\n\n "
66
66
<< " OPTIONS:\n "
67
67
<< " -h --help - Display available options\n "
68
- << " -v --version - Display the version of this program\n "
68
+ << " -V --version - Display the version of this program\n "
69
69
<< " -D - Use zero for timestamps and uids/gids "
70
70
" (default)\n "
71
71
<< " -U - Use actual timestamps and uids/gids\n "
@@ -1439,7 +1439,7 @@ static int ranlib_main(int argc, char **argv) {
1439
1439
} else if (arg.front () == ' h' ) {
1440
1440
printHelpMessage ();
1441
1441
return 0 ;
1442
- } else if (arg.front () == ' v ' ) {
1442
+ } else if (arg.front () == ' V ' ) {
1443
1443
cl::PrintVersionMessage ();
1444
1444
return 0 ;
1445
1445
} else if (arg.front () == ' X' ) {
You can’t perform that action at this time.
0 commit comments