1include "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.
6class F<string name> : Flag<["/", "-", "/?", "-?"], name>;
7
8// Flag that takes one argument after ":".
9class P<string name, string help> :
10      Joined<["/", "-", "/?", "-?"], name#":">, HelpText<help>;
11
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.
14multiclass 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>;
17}
18
19def ignore : P<"ignore", "Specify warning codes to ignore">;
20def libpath: P<"libpath", "Object file search path">;
21
22// Can't be called "list" since that's a keyword.
23def lst    : F<"list">, HelpText<"List contents of .lib file on stdout">;
24def out    : P<"out", "Path to file to write output">;
25def deffile : P<"def", "def file to use to generate import library">;
26
27def llvmlibthin : F<"llvmlibthin">,
28    HelpText<"Make .lib point to .obj files instead of copying their contents">;
29
30def llvmlibempty : F<"llvmlibempty">,
31    HelpText<"When given no contents, produce an empty .lib file">;
32
33def machine: P<"machine", "Specify target platform">;
34
35defm WX : B<"WX", "Treat warnings as errors",
36            "Don't treat warnings as errors (default)">;
37
38def help : F<"help">;
39
40// /?? and -?? must be before /? and -? to not confuse lib/Options.
41def help_q : Flag<["/??", "-??", "/?", "-?"], "">, Alias<help>;
42
43//==============================================================================
44// The flags below do nothing. They are defined only for lib.exe compatibility.
45//==============================================================================
46
47def ltcg : F<"ltcg">;
48def nodefaultlib: P<"nodefaultlib", "">;
49def nodefaultlib_all: F<"nodefaultlib">;
50def nologo : F<"nologo">;
51def subsystem : P<"subsystem", "">;
52def verbose : F<"verbose">;
53