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