Opts.td 6.7 KB

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