xref: /freebsd/contrib/llvm-project/llvm/lib/ToolDrivers/llvm-lib/Options.td (revision 47ef2a131091508e049ab10cad7f91a3c1342cd9)
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">;
26def nativedeffile : P<"defArm64Native", "def file to use to generate native ARM64 symbols in ARM64EC import library">;
27
28def llvmlibthin : F<"llvmlibthin">,
29    HelpText<"Make .lib point to .obj files instead of copying their contents">;
30
31def llvmlibempty : F<"llvmlibempty">,
32    HelpText<"When given no contents, produce an empty .lib file">;
33
34def machine: P<"machine", "Specify target platform">;
35
36defm WX : B<"WX", "Treat warnings as errors",
37            "Don't treat warnings as errors (default)">;
38
39def help : F<"help">;
40
41// /?? and -?? must be before /? and -? to not confuse lib/Options.
42def help_q : Flag<["/??", "-??", "/?", "-?"], "">, Alias<help>;
43
44//==============================================================================
45// The flags below do nothing. They are defined only for lib.exe compatibility.
46//==============================================================================
47
48def ltcg : F<"ltcg">;
49def nodefaultlib: P<"nodefaultlib", "">;
50def nodefaultlib_all: F<"nodefaultlib">;
51def nologo : F<"nologo">;
52def subsystem : P<"subsystem", "">;
53def verbose : F<"verbose">;
54