Peter Collingbourne | bc05163 | 2015-06-09 21:50:22 +0000 | [diff] [blame] | 1 | include "llvm/Option/OptParser.td" |
| 2 | |
| 3 | // lib.exe accepts options starting with either a dash or a slash. |
| 4 | |
| 5 | // Flag that takes no arguments. |
| 6 | class F<string name> : Flag<["/", "-", "-?"], name>; |
| 7 | |
| 8 | // Flag that takes one argument after ":". |
| 9 | class P<string name, string help> : |
| 10 | Joined<["/", "-", "-?"], name#":">, HelpText<help>; |
| 11 | |
Peter Collingbourne | 7070827 | 2015-06-20 00:57:12 +0000 | [diff] [blame] | 12 | def libpath: P<"libpath", "Object file search path">; |
Nico Weber | a2f6093 | 2019-02-09 17:33:04 +0000 | [diff] [blame] | 13 | |
| 14 | // Can't be called "list" since that's a keyword. |
| 15 | def lst : F<"list">, HelpText<"List contents of .lib file on stdout">; |
Peter Collingbourne | bc05163 | 2015-06-09 21:50:22 +0000 | [diff] [blame] | 16 | def out : P<"out", "Path to file to write output">; |
| 17 | |
Nico Weber | 17172c6 | 2018-07-14 02:29:44 +0000 | [diff] [blame] | 18 | def llvmlibthin : F<"llvmlibthin">, |
| 19 | HelpText<"Make .lib point to .obj files instead of copying their contents">; |
| 20 | |
| 21 | def help : F<"help">; |
| 22 | def help_q : Flag<["/?", "-?"], "">, Alias<help>; |
Rafael Espindola | 2bec850 | 2015-07-17 16:01:11 +0000 | [diff] [blame] | 23 | |
Peter Collingbourne | bc05163 | 2015-06-09 21:50:22 +0000 | [diff] [blame] | 24 | //============================================================================== |
| 25 | // The flags below do nothing. They are defined only for lib.exe compatibility. |
| 26 | //============================================================================== |
Peter Collingbourne | 7070827 | 2015-06-20 00:57:12 +0000 | [diff] [blame] | 27 | |
| 28 | class QF<string name> : Joined<["/", "-", "-?"], name#":">; |
| 29 | |
| 30 | def ignore : QF<"ignore">; |
| 31 | def machine: QF<"machine">; |
Peter Collingbourne | bc05163 | 2015-06-09 21:50:22 +0000 | [diff] [blame] | 32 | def nologo : F<"nologo">; |