xref: /llvm-project/clang/tools/clang-scan-deps/Opts.td (revision 6a4eaf9b33d8091b7d09b2a30a3fc8993a01db31)
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_name : Eq<"module-name", "the module of which the dependencies are to be computed">;
30defm dependency_target : Eq<"dependency-target", "The names of dependency targets for the dependency file">;
31
32def deprecated_driver_command : F<"deprecated-driver-command", "use a single driver command to build the tu (deprecated)">;
33
34defm resource_dir_recipe : Eq<"resource-dir-recipe", "How to produce missing '-resource-dir' argument">;
35
36def print_timing : F<"print-timing", "Print timing information">;
37
38def verbose : F<"v", "Use verbose output">;
39
40def round_trip_args : F<"round-trip-args", "verify that command-line arguments are canonical by parsing and re-serializing">;
41
42def DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>;
43