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 31defm llvmlibindex : B<"llvmlibindex", "Write an index to the output (default)", 32 "Do not write an index to the output">; 33 34def llvmlibempty : F<"llvmlibempty">, 35 HelpText<"When given no contents, produce an empty .lib file">; 36 37def machine: P<"machine", "Specify target platform">; 38 39defm WX : B<"WX", "Treat warnings as errors", 40 "Don't treat warnings as errors (default)">; 41 42def help : F<"help">; 43 44// /?? and -?? must be before /? and -? to not confuse lib/Options. 45def help_q : Flag<["/??", "-??", "/?", "-?"], "">, Alias<help>; 46 47//============================================================================== 48// The flags below do nothing. They are defined only for lib.exe compatibility. 49//============================================================================== 50 51def ltcg : F<"ltcg">; 52def nodefaultlib: P<"nodefaultlib", "">; 53def nodefaultlib_all: F<"nodefaultlib">; 54def nologo : F<"nologo">; 55def subsystem : P<"subsystem", "">; 56def verbose : F<"verbose">; 57