Opts.td 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. include "llvm/Option/OptParser.td"
  2. // For LLVM-specific options, we prefer a two-dash prefix, but accept one for
  3. // compatibility with llvm-mc. For clear separation from ML.EXE compatible
  4. // options, slash is not accepted.
  5. class LLVMFlag<string name> : Flag<["--", "-"], name>;
  6. class LLVMJoined<string name> : Joined<["--", "-"], name>;
  7. class LLVMJoinedOrSeparate<string name> : JoinedOrSeparate<["--", "-"], name>;
  8. class LLVMSeparate<string name> : Separate<["--", "-"], name>;
  9. class LLVMCommaJoined<string name> : CommaJoined<["--", "-"], name>;
  10. def ml_Group : OptionGroup<"<ml options>">,
  11. HelpText<"ML.EXE COMPATIBILITY OPTIONS">;
  12. class MLFlag<string name> : Flag<["/", "-"], name>, Group<ml_Group>;
  13. class MLJoined<string name> : Joined<["/", "-"], name>, Group<ml_Group>;
  14. class MLJoinedOrSeparate<string name> : JoinedOrSeparate<["/", "-"], name>,
  15. Group<ml_Group>;
  16. class MLSeparate<string name> : Separate<["/", "-"], name>, Group<ml_Group>;
  17. def unsupported_Group : OptionGroup<"unsupported">, Flags<[HelpHidden]>,
  18. HelpText<"UNSUPPORTED ML.EXE COMPATIBILITY OPTIONS">;
  19. class UnsupportedFlag<string name> : Flag<["/", "-"], name>,
  20. Group<unsupported_Group>;
  21. class UnsupportedJoined<string name> : Joined<["/", "-"], name>,
  22. Group<unsupported_Group>;
  23. class UnsupportedJoinedOrSeparate<string name> :
  24. JoinedOrSeparate<["/", "-"], name>, Group<unsupported_Group>;
  25. class UnsupportedSeparate<string name> : Separate<["/", "-"], name>,
  26. Group<unsupported_Group>;
  27. def bitness : LLVMJoined<"m">, Values<"32,64">,
  28. HelpText<"Target platform (x86 or x86-64)">;
  29. def as_lex : LLVMFlag<"as-lex">,
  30. HelpText<"Lex tokens from a file without assembling">;
  31. def debug : LLVMFlag<"debug">, Flags<[HelpHidden]>,
  32. HelpText<"Enable debug output">;
  33. def debug_only : LLVMCommaJoined<"debug-only=">, Flags<[HelpHidden]>,
  34. HelpText<"Enable a specific type of debug output (comma "
  35. "separated list of types)">;
  36. def fatal_warnings : LLVMFlag<"fatal-warnings">,
  37. HelpText<"Treat warnings as errors">;
  38. def filetype : LLVMJoined<"filetype=">, Values<"obj,s,null">,
  39. HelpText<"Emit a file with the given type">;
  40. def output_att_asm : LLVMFlag<"output-att-asm">,
  41. HelpText<"Use ATT syntax for output assembly">;
  42. def show_encoding : LLVMFlag<"show-encoding">,
  43. HelpText<"Show instruction encodings in output assembly">;
  44. def show_inst : LLVMFlag<"show-inst">,
  45. HelpText<"Show internal instruction representation in output "
  46. "assembly">;
  47. def show_inst_operands : LLVMFlag<"show-inst-operands">,
  48. HelpText<"Show instructions operands as parsed">;
  49. def print_imm_hex : LLVMFlag<"print-imm-hex">,
  50. HelpText<"Prefer hex format for immediate values in output "
  51. "assembly">;
  52. def preserve_comments : LLVMFlag<"preserve-comments">,
  53. HelpText<"Preserve comments in output assembly">;
  54. def save_temp_labels : LLVMFlag<"save-temp-labels">,
  55. HelpText<"Don't discard temporary labels">;
  56. def timestamp : LLVMJoined<"timestamp=">,
  57. HelpText<"Specify the assembly timestamp (used for @Date and "
  58. "@Time built-ins)">;
  59. def utc : LLVMFlag<"utc">,
  60. HelpText<"Render @Date and @Time built-ins in GMT/UTC">;
  61. def gmtime : LLVMFlag<"gmtime">, Alias<utc>;
  62. def help : MLFlag<"?">,
  63. HelpText<"Display available options">;
  64. def help_long : MLFlag<"help">, Alias<help>;
  65. def assemble_only : MLFlag<"c">, HelpText<"Assemble only; do not link">;
  66. def define : MLJoinedOrSeparate<"D">, MetaVarName<"<macro>=<value>">,
  67. HelpText<"Define <macro> to <value> (or blank if <value> "
  68. "omitted)">;
  69. def no_logo : MLFlag<"nologo">, HelpText<"">;
  70. def output_file : MLJoinedOrSeparate<"Fo">, HelpText<"Names the output file">;
  71. def include_path : MLJoinedOrSeparate<"I">,
  72. HelpText<"Sets path for include files">;
  73. def safeseh : MLFlag<"safeseh">,
  74. HelpText<"Mark resulting object files as either containing no "
  75. "exception handlers or containing exception handlers "
  76. "that are all declared with .SAFESEH. Only available in "
  77. "32-bit.">;
  78. def assembly_file : MLJoinedOrSeparate<"Ta">,
  79. HelpText<"Assemble source file with the given name. Used "
  80. "if the filename begins with a forward slash.">;
  81. def error_on_warning : MLFlag<"WX">, Alias<fatal_warnings>;
  82. def parse_only : MLFlag<"Zs">, HelpText<"Run a syntax-check only">,
  83. Alias<filetype>, AliasArgs<["null"]>;
  84. def ignore_include_envvar : MLFlag<"X">,
  85. HelpText<"Ignore the INCLUDE environment variable">;
  86. def tiny_model_support : UnsupportedFlag<"AT">, HelpText<"">;
  87. def alternate_linker : UnsupportedJoined<"Bl">, HelpText<"">;
  88. def coff_object_file : UnsupportedFlag<"coff">, HelpText<"">;
  89. def preserve_identifier_case : UnsupportedFlag<"Cp">, HelpText<"">;
  90. def uppercase_identifiers : UnsupportedFlag<"Cu">, HelpText<"">;
  91. def preserve_extern_case : UnsupportedFlag<"Cx">, HelpText<"">;
  92. def output_preprocessed : UnsupportedFlag<"EP">, HelpText<"">;
  93. def errorreport : UnsupportedJoined<"ERRORREPORT">, HelpText<"">;
  94. def stacksize : UnsupportedSeparate<"F">, HelpText<"">;
  95. def executable_file : UnsupportedSeparate<"Fe">, HelpText<"">;
  96. def code_listing_file : UnsupportedJoined<"FI">, HelpText<"">;
  97. def linker_map_file : UnsupportedJoined<"Fm">, HelpText<"">;
  98. def fp_emulator_fixups : UnsupportedFlag<"FPi">, HelpText<"">;
  99. def source_browser_file : UnsupportedJoined<"Fr">, HelpText<"">;
  100. def extended_source_browser_file : UnsupportedJoined<"FR">, HelpText<"">;
  101. def pascal_conventions : UnsupportedFlag<"Gc">, HelpText<"">;
  102. def c_conventions : UnsupportedFlag<"Gd">, HelpText<"">;
  103. def stdcall_conventions : UnsupportedFlag<"GZ">, HelpText<"">;
  104. def extern_name_limit : UnsupportedSeparate<"H">, HelpText<"">;
  105. def omf_object_file : UnsupportedFlag<"omf">, HelpText<"">;
  106. def full_listing : UnsupportedFlag<"Sa">, HelpText<"">;
  107. def first_pass_listing : UnsupportedFlag<"Sf">, HelpText<"">;
  108. def listing_width : UnsupportedSeparate<"SI">, HelpText<"">;
  109. def listing_without_symbols : UnsupportedFlag<"Sn">, HelpText<"">;
  110. def listing_page_length : UnsupportedSeparate<"Sp">, HelpText<"">;
  111. def listing_subtitle : UnsupportedSeparate<"Ss">, HelpText<"">;
  112. def listing_title : UnsupportedSeparate<"St">, HelpText<"">;
  113. def listing_false_conditionals : UnsupportedFlag<"Sx">, HelpText<"">;
  114. def extra_warnings : UnsupportedFlag<"w">, HelpText<"">;
  115. def warning_level : UnsupportedJoined<"W">, HelpText<"">;
  116. def line_number_info : UnsupportedFlag<"Zd">, HelpText<"">;
  117. def export_all_symbols : UnsupportedFlag<"Zf">, HelpText<"">;
  118. def codeview_info : UnsupportedFlag<"Zi">, HelpText<"">;
  119. def enable_m510_option : UnsupportedFlag<"Zm">, HelpText<"">;
  120. def structure_packing : UnsupportedJoined<"Zp">, HelpText<"">;