xref: /freebsd-src/contrib/llvm-project/llvm/lib/ToolDrivers/llvm-lib/Options.td (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
10b57cec5SDimitry Andricinclude "llvm/Option/OptParser.td"
20b57cec5SDimitry Andric
30b57cec5SDimitry Andric// lib.exe accepts options starting with either a dash or a slash.
40b57cec5SDimitry Andric
50b57cec5SDimitry Andric// Flag that takes no arguments.
60b57cec5SDimitry Andricclass F<string name> : Flag<["/", "-", "/?", "-?"], name>;
70b57cec5SDimitry Andric
80b57cec5SDimitry Andric// Flag that takes one argument after ":".
90b57cec5SDimitry Andricclass P<string name, string help> :
100b57cec5SDimitry Andric      Joined<["/", "-", "/?", "-?"], name#":">, HelpText<help>;
110b57cec5SDimitry Andric
1281ad6265SDimitry Andric// Boolean flag which can be suffixed by ":no". Using it unsuffixed turns the
1381ad6265SDimitry Andric// flag on and using it suffixed by ":no" turns it off.
1481ad6265SDimitry Andricmulticlass B<string name, string help_on, string help_off> {
1581ad6265SDimitry Andric  def "" : F<name>, HelpText<help_on>;
1681ad6265SDimitry Andric  def _no : F<name#":no">, HelpText<help_off>;
1781ad6265SDimitry Andric}
1881ad6265SDimitry Andric
1981ad6265SDimitry Andricdef ignore : P<"ignore", "Specify warning codes to ignore">;
200b57cec5SDimitry Andricdef libpath: P<"libpath", "Object file search path">;
210b57cec5SDimitry Andric
220b57cec5SDimitry Andric// Can't be called "list" since that's a keyword.
230b57cec5SDimitry Andricdef lst    : F<"list">, HelpText<"List contents of .lib file on stdout">;
240b57cec5SDimitry Andricdef out    : P<"out", "Path to file to write output">;
2506c3fb27SDimitry Andricdef deffile : P<"def", "def file to use to generate import library">;
26*0fca6ea1SDimitry Andricdef nativedeffile : P<"defArm64Native", "def file to use to generate native ARM64 symbols in ARM64EC import library">;
270b57cec5SDimitry Andric
280b57cec5SDimitry Andricdef llvmlibthin : F<"llvmlibthin">,
290b57cec5SDimitry Andric    HelpText<"Make .lib point to .obj files instead of copying their contents">;
300b57cec5SDimitry Andric
315ffd83dbSDimitry Andricdef llvmlibempty : F<"llvmlibempty">,
325ffd83dbSDimitry Andric    HelpText<"When given no contents, produce an empty .lib file">;
335ffd83dbSDimitry Andric
340b57cec5SDimitry Andricdef machine: P<"machine", "Specify target platform">;
350b57cec5SDimitry Andric
3681ad6265SDimitry Andricdefm WX : B<"WX", "Treat warnings as errors",
3781ad6265SDimitry Andric            "Don't treat warnings as errors (default)">;
3881ad6265SDimitry Andric
390b57cec5SDimitry Andricdef help : F<"help">;
400b57cec5SDimitry Andric
410b57cec5SDimitry Andric// /?? and -?? must be before /? and -? to not confuse lib/Options.
420b57cec5SDimitry Andricdef help_q : Flag<["/??", "-??", "/?", "-?"], "">, Alias<help>;
430b57cec5SDimitry Andric
440b57cec5SDimitry Andric//==============================================================================
450b57cec5SDimitry Andric// The flags below do nothing. They are defined only for lib.exe compatibility.
460b57cec5SDimitry Andric//==============================================================================
470b57cec5SDimitry Andric
4881ad6265SDimitry Andricdef ltcg : F<"ltcg">;
49753f127fSDimitry Andricdef nodefaultlib: P<"nodefaultlib", "">;
50753f127fSDimitry Andricdef nodefaultlib_all: F<"nodefaultlib">;
510b57cec5SDimitry Andricdef nologo : F<"nologo">;
5281ad6265SDimitry Andricdef subsystem : P<"subsystem", "">;
53fcaf7f86SDimitry Andricdef verbose : F<"verbose">;
54