Options.td 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. include "llvm/Option/OptParser.td"
  2. // lib.exe accepts options starting with either a dash or a slash.
  3. // Flag that takes no arguments.
  4. class F<string name> : Flag<["/", "-", "/?", "-?"], name>;
  5. // Flag that takes one argument after ":".
  6. class P<string name, string help> :
  7. Joined<["/", "-", "/?", "-?"], name#":">, HelpText<help>;
  8. // Boolean flag which can be suffixed by ":no". Using it unsuffixed turns the
  9. // flag on and using it suffixed by ":no" turns it off.
  10. multiclass B<string name, string help_on, string help_off> {
  11. def "" : F<name>, HelpText<help_on>;
  12. def _no : F<name#":no">, HelpText<help_off>;
  13. }
  14. def ignore : P<"ignore", "Specify warning codes to ignore">;
  15. def libpath: P<"libpath", "Object file search path">;
  16. // Can't be called "list" since that's a keyword.
  17. def lst : F<"list">, HelpText<"List contents of .lib file on stdout">;
  18. def out : P<"out", "Path to file to write output">;
  19. def llvmlibthin : F<"llvmlibthin">,
  20. HelpText<"Make .lib point to .obj files instead of copying their contents">;
  21. def llvmlibempty : F<"llvmlibempty">,
  22. HelpText<"When given no contents, produce an empty .lib file">;
  23. def machine: P<"machine", "Specify target platform">;
  24. defm WX : B<"WX", "Treat warnings as errors",
  25. "Don't treat warnings as errors (default)">;
  26. def help : F<"help">;
  27. // /?? and -?? must be before /? and -? to not confuse lib/Options.
  28. def help_q : Flag<["/??", "-??", "/?", "-?"], "">, Alias<help>;
  29. //==============================================================================
  30. // The flags below do nothing. They are defined only for lib.exe compatibility.
  31. //==============================================================================
  32. def ltcg : F<"ltcg">;
  33. def nodefaultlib: P<"nodefaultlib", "">;
  34. def nodefaultlib_all: F<"nodefaultlib">;
  35. def nologo : F<"nologo">;
  36. def subsystem : P<"subsystem", "">;
  37. def verbose : F<"verbose">;