binutils ar does not support one-dash long options (they conflict with operation code and modifier flags). ``` % ar -help ar: invalid option -- 'e' ... % ar -version ar: invalid option -- 'e' ... % ar x --plugin=xx x.a # ok % ar x -plugin=xx x.a ar: two different operation options specified % ar -plugin=/usr/lib/gcc/x86_64-linux-gnu/10/liblto_plugin.so x x.a ar: x: No such file or directory ``` Drop one-dash long options to simplify code and match the usual practice for command line utilities. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D116977
15 lines
399 B
Plaintext
15 lines
399 B
Plaintext
## Show that the version for llvm-ar can be printed with either the long flag
|
|
## -version or with the V modifier.
|
|
|
|
RUN: llvm-ar V | FileCheck %s
|
|
RUN: llvm-ar xV | FileCheck %s
|
|
RUN: llvm-ar -V | FileCheck %s
|
|
RUN: llvm-ar -xV | FileCheck %s
|
|
RUN: llvm-ar --version | FileCheck %s
|
|
|
|
CHECK: version
|
|
|
|
RUN: not llvm-ar -version 2>&1 | FileCheck %s --check-prefix=ONE-DASH
|
|
|
|
ONE-DASH: error: unknown option e
|