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
11 lines
387 B
Plaintext
11 lines
387 B
Plaintext
## --version skips input file processing.
|
|
# RUN: ld.lld --version %t/not-exist 2>&1 | FileCheck %s
|
|
|
|
## -v/-V don't skip processing if there is any input.
|
|
# RUN: ld.lld -v 2>&1 | FileCheck %s
|
|
# RUN: not ld.lld -v %t/not-exist 2>&1 | FileCheck %s
|
|
# RUN: ld.lld -V 2>&1 | FileCheck %s
|
|
# RUN: not ld.lld -V %t/not-exist 2>&1 | FileCheck %s
|
|
|
|
# CHECK: LLD {{.*}} (compatible with GNU linkers)
|