1include "llvm/Option/OptParser.td" 2 3multiclass BB<string name, string help1, string help2> { 4 def NAME: Flag<["--"], name>, HelpText<help1>; 5 def no_ # NAME: Flag<["--"], "no-" # name>, HelpText<help2>; 6} 7 8def build_accelerator: Separate<["--", "-"], "build-accelerator">, 9 MetaVarName<"[none,DWARF]">, 10 HelpText<"Build accelerator tables(default: none)\n" 11 " =none - Do not build accelerators\n" 12 " =DWARF - .debug_names are generated for all DWARF versions\n" 13 >; 14def: Joined<["--", "-"], "build-accelerator=">, Alias<build_accelerator>; 15 16def help : Flag<["--"], "help">, 17 HelpText<"Prints this help output">; 18 19def h : Flag<["-"], "h">, 20 Alias<help>, 21 HelpText<"Alias for --help">; 22 23def linker: Separate<["--", "-"], "linker">, 24 MetaVarName<"<DWARF linker type>">, 25 HelpText<"Specify the desired type of DWARF linker. Defaults to 'classic'">; 26def: Joined<["--", "-"], "linker=">, Alias<linker>; 27 28defm odr_deduplication : BB<"odr-deduplication", 29 "Do ODR deduplication for debug types(default)", 30 "Don`t do ODR deduplication for debug types">; 31 32def odr : Flag<["--"], "odr">, 33 Alias<odr_deduplication>, 34 HelpText<"Alias for --odr-deduplication">; 35 36def no_odr : Flag<["--"], "no-odr">, 37 Alias<no_odr_deduplication>, 38 HelpText<"Alias for --no-odr-deduplication">; 39 40defm garbage_collection : BB<"garbage-collection", 41 "Do garbage collection for debug info(default)", 42 "Don`t do garbage collection for debug info">; 43 44defm separate_debug_file : BB<"separate-debug-file", 45 "Create two output files: file w/o debug tables and file with debug tables", 46 "Create single output file, containing debug tables(default)">; 47 48def tombstone: Separate<["--", "-"], "tombstone">, 49 MetaVarName<"[bfd,maxpc,exec,universal]">, 50 HelpText<"Tombstone value used as a marker of invalid address(default: universal)\n" 51 " =bfd - Zero for all addresses and [1,1] for DWARF v4 (or less) address ranges and exec\n" 52 " =maxpc - Minus 1 for all addresses and minus 2 for DWARF v4 (or less) address ranges\n" 53 " =exec - Match with address ranges of executable sections\n" 54 " =universal - Both: bfd and maxpc" 55 >; 56def: Joined<["--", "-"], "tombstone=">, Alias<tombstone>; 57 58def threads: Separate<["--", "-"], "num-threads">, 59 MetaVarName<"<threads>">, 60 HelpText<"Number of available threads for multi-threaded execution. " 61 "Defaults to the number of cores on the current machine">; 62 63def: Separate<["-"], "j">, 64 Alias<threads>, 65 HelpText<"Alias for --num-threads">; 66 67def verbose : Flag<["--"], "verbose">, 68 HelpText<"Enable verbose logging">; 69 70def verify : Flag<["--"], "verify">, 71 HelpText<"Run the DWARF verifier on the resulting debug info">; 72 73def version : Flag<["--"], "version">, 74 HelpText<"Print the version and exit">; 75 76def V : Flag<["-"], "V">, 77 Alias<version>, 78 HelpText<"Alias for --version">; 79