52 lines · plain
1include "llvm/Option/OptParser.td"2 3class F<string name, string help> : Flag<["-"], name>, HelpText<help>;4class Arg<string name, string help> : Separate<["-"], name>, HelpText<help>;5 6multiclass Eq<string name, string help> {7 def NAME #_EQ : Joined<["-", "--"], name #"=">, HelpText<help>;8 def : Separate<["-", "--"], name>, Alias<!cast<Joined>(NAME #_EQ)>;9}10 11def help : Flag<["--"], "help">, HelpText<"Display this help">;12def version : Flag<["--"], "version">, HelpText<"Display the version">;13 14def o : Arg<"o", "Destination of the primary output">;15 16defm mode : Eq<"mode", "The preprocessing mode used to compute the dependencies">;17 18defm format : Eq<"format", "The output format for the dependencies">;19 20defm module_files_dir : Eq<"module-files-dir",21 "The build directory for modules. Defaults to the value of '-fmodules-cache-path=' from command lines for implicit modules">;22 23def optimize_args_EQ : CommaJoined<["-", "--"], "optimize-args=">, HelpText<"Which command-line arguments of modules to optimize">;24def eager_load_pcm : F<"eager-load-pcm", "Load PCM files eagerly (instead of lazily on import)">;25 26def j : Arg<"j", "Number of worker threads to use (default: use all concurrent threads)">;27 28defm compilation_database : Eq<"compilation-database", "Compilation database">;29defm module_names30 : Eq<"module-names", "A comma separated list of names of modules of which "31 "the dependencies are to be computed">;32defm dependency_target : Eq<"dependency-target", "The names of dependency targets for the dependency file">;33 34defm tu_buffer_path: Eq<"tu-buffer-path", "The path to the translation unit for depscan. Not compatible with -module-name">;35 36def deprecated_driver_command : F<"deprecated-driver-command", "use a single driver command to build the tu (deprecated)">;37 38defm resource_dir_recipe : Eq<"resource-dir-recipe", "How to produce missing '-resource-dir' argument">;39 40def print_timing : F<"print-timing", "Print timing information">;41 42def emit_visible_modules43 : F<"emit-visible-modules", "emit visible modules in primary output">;44 45def verbose : F<"v", "Use verbose output">;46 47def round_trip_args : F<"round-trip-args", "verify that command-line arguments are canonical by parsing and re-serializing">;48 49def verbatim_args : F<"verbatim-args", "Pass commands to the scanner verbatim without adjustments">;50 51def DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>;52