1 include "llvm/Option/OptParser.td"
3 // lib.exe accepts options starting with either a dash or a slash.
5 // Flag that takes no arguments.
6 class F<string name> : Flag<["/", "-", "/?", "-?"], name>;
8 // Flag that takes one argument after ":".
9 class P<string name, string help> :
10 Joined<["/", "-", "/?", "-?"], name#":">, HelpText<help>;
12 // Boolean flag which can be suffixed by ":no". Using it unsuffixed turns the
13 // flag on and using it suffixed by ":no" turns it off.
14 multiclass B<string name, string help_on, string help_off> {
15 def "" : F<name>, HelpText<help_on>;
16 def _no : F<name#":no">, HelpText<help_off>;
19 def ignore : P<"ignore", "Specify warning codes to ignore">;
20 def libpath: P<"libpath", "Object file search path">;
22 // Can't be called "list" since that's a keyword.
23 def lst : F<"list">, HelpText<"List contents of .lib file on stdout">;
24 def out : P<"out", "Path to file to write output">;
25 def deffile : P<"def", "def file to use to generate import library">;
27 def llvmlibthin : F<"llvmlibthin">,
28 HelpText<"Make .lib point to .obj files instead of copying their contents">;
30 def llvmlibempty : F<"llvmlibempty">,
31 HelpText<"When given no contents, produce an empty .lib file">;
33 def machine: P<"machine", "Specify target platform">;
35 defm WX : B<"WX", "Treat warnings as errors",
36 "Don't treat warnings as errors (default)">;
40 // /?? and -?? must be before /? and -? to not confuse lib/Options.
41 def help_q : Flag<["/??", "-??", "/?", "-?"], "">, Alias<help>;
43 //==============================================================================
44 // The flags below do nothing. They are defined only for lib.exe compatibility.
45 //==============================================================================
48 def nodefaultlib: P<"nodefaultlib", "">;
49 def nodefaultlib_all: F<"nodefaultlib">;
50 def nologo : F<"nologo">;
51 def subsystem : P<"subsystem", "">;
52 def verbose : F<"verbose">;