Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm-ar] Enforce one-dash form for long options
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
- Loading branch information
Showing
5 changed files
with
19 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## Test that --plugin is ignored. | ||
|
||
# RUN: rm -f %t.a | ||
# RUN: touch %t.txt | ||
# RUN: llvm-ar rc %t.a %t.txt | ||
# RUN: llvm-ar --plugin ignore t %t.a | FileCheck %s | ||
# RUN: llvm-ar t --plugin=ignore %t.a | FileCheck %s | ||
|
||
# CHECK: {{.*}}.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters