[libc] Fix WrapperGen seeing no arguments as a void argument.
[lldb.git] / lld / MinGW / Options.td
1 include "llvm/Option/OptParser.td"
2
3 class F<string name>: Flag<["--", "-"], name>;
4 class J<string name>: Joined<["--", "-"], name>;
5 class S<string name>: Separate<["--", "-"], name>;
6
7 multiclass Eq<string name, string help> {
8   def NAME: Separate<["--", "-"], name>;
9   def NAME # _eq: Joined<["--", "-"], name # "=">, Alias<!cast<Separate>(NAME)>,
10     HelpText<help>;
11 }
12
13 multiclass EqLong<string name, string help> {
14   def NAME: Separate<["--"], name>;
15   def NAME # _eq: Joined<["--"], name # "=">, Alias<!cast<Separate>(NAME)>,
16     HelpText<help>;
17 }
18
19 multiclass B<string name, string help1, string help2> {
20   def NAME: Flag<["--", "-"], name>, HelpText<help1>;
21   def no_ # NAME: Flag<["--", "-"], "no-" # name>, HelpText<help2>;
22 }
23
24 def L: JoinedOrSeparate<["-"], "L">, MetaVarName<"<dir>">,
25   HelpText<"Add a directory to the library search path">;
26 defm allow_multiple_definition: B<"allow-multiple-definition",
27     "Allow multiple definitions",
28     "Do not allow multiple definitions (default)">;
29 def Bdynamic: F<"Bdynamic">, HelpText<"Link against shared libraries">;
30 def Bstatic: F<"Bstatic">, HelpText<"Do not link against shared libraries">;
31 def disable_auto_import: F<"disable-auto-import">,
32     HelpText<"Don't automatically import data symbols from other DLLs without dllimport">;
33 def disable_runtime_pseudo_reloc: F<"disable-runtime-pseudo-reloc">,
34     HelpText<"Don't do automatic imports that require runtime fixups">;
35 defm dynamicbase: B<"dynamicbase", "Enable ASLR", "Disable ASLR">;
36 def enable_auto_import: F<"enable-auto-import">,
37     HelpText<"Automatically import data symbols from other DLLs where needed">;
38 def enable_runtime_pseudo_reloc: F<"enable-runtime-pseudo-reloc">,
39     HelpText<"Allow automatic imports that require runtime fixups">;
40 defm entry: Eq<"entry", "Name of entry point symbol">, MetaVarName<"<entry>">;
41 def exclude_all_symbols: F<"exclude-all-symbols">,
42     HelpText<"Don't automatically export any symbols">;
43 def export_all_symbols: F<"export-all-symbols">,
44     HelpText<"Export all symbols even if a def file or dllexport attributes are used">;
45 defm file_alignment: Eq<"file-alignment", "Set file alignment">;
46 defm gc_sections: B<"gc-sections",
47     "Remove unused sections",
48     "Don't remove unused sections">;
49 def help: F<"help">, HelpText<"Print option help">;
50 def icf: J<"icf=">, HelpText<"Identical code folding">;
51 def image_base: S<"image-base">, HelpText<"Base address of the program">;
52 defm insert_timestamp: B<"insert-timestamp",
53     "Include PE header timestamp",
54     "Don't include PE header timestamp">;
55 def kill_at: F<"kill-at">, HelpText<"Remove @n from exported symbols">;
56 def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"<libName>">,
57   HelpText<"Root name of library to use">;
58 def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">;
59 defm major_os_version: EqLong<"major-os-version",
60      "Set the OS and subsystem major version">;
61 defm major_subsystem_version: EqLong<"major-subsystem-version",
62      "Set the OS and subsystem major version">;
63 defm map: Eq<"Map", "Output a linker map">;
64 defm minor_os_version: EqLong<"minor-os-version",
65      "Set the OS and subsystem minor version">;
66 defm minor_subsystem_version: EqLong<"minor-subsystem-version",
67      "Set the OS and subsystem minor version">;
68 def no_seh: F<"no-seh">, HelpText<"Set the 'no SEH' flag in the executable">;
69 def large_address_aware: Flag<["--"], "large-address-aware">,
70     HelpText<"Enable large addresses">;
71 def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">,
72   HelpText<"Path to file to write output">;
73 defm out_implib: Eq<"out-implib", "Import library name">;
74 defm output_def: Eq<"output-def", "Output def file">;
75 defm section_alignment: Eq<"section-alignment", "Set section alignment">;
76 def shared: F<"shared">, HelpText<"Build a shared object">;
77 defm subs: Eq<"subsystem", "Specify subsystem">;
78 def stack: S<"stack">;
79 def strip_all: F<"strip-all">,
80     HelpText<"Omit all symbol information from the output binary">;
81 def strip_debug: F<"strip-debug">,
82     HelpText<"Omit all debug information, but keep symbol information">;
83 defm reproduce: Eq<"reproduce",
84      "Write a tar file containing input files and command line options to reproduce link">;
85 defm require_defined: Eq<"require-defined",
86      "Force symbol to be added to symbol table as an undefined one">;
87 defm undefined: Eq<"undefined", "Include symbol in the link, if available">;
88 defm whole_archive: B<"whole-archive",
89     "Include all object files for following archives",
90     "No longer include all object files for following archives">;
91 def v: Flag<["-"], "v">, HelpText<"Display the version number">;
92 def verbose: F<"verbose">, HelpText<"Verbose mode">;
93 def version: F<"version">, HelpText<"Display the version number and exit">;
94 defm wrap: Eq<"wrap", "Use wrapper functions for symbol">,
95      MetaVarName<"<symbol>">;
96
97 // LLD specific options
98 def _HASH_HASH_HASH : Flag<["-"], "###">,
99     HelpText<"Print (but do not run) the commands to run for this compilation">;
100 def appcontainer: F<"appcontainer">, HelpText<"Set the appcontainer flag in the executable">;
101 defm delayload: Eq<"delayload", "DLL to load only on demand">;
102 def mllvm: S<"mllvm">;
103 defm pdb: Eq<"pdb", "Output PDB debug info file, chosen implicitly if the argument is empty">;
104 defm thinlto_cache_dir: EqLong<"thinlto-cache-dir",
105   "Path to ThinLTO cached object file directory">;
106 def Xlink : J<"Xlink=">, MetaVarName<"<arg>">,
107     HelpText<"Pass <arg> to the COFF linker">;
108
109 // Alias
110 def alias_entry_e: JoinedOrSeparate<["-"], "e">, Alias<entry>;
111 def alias_strip_s: Flag<["-"], "s">, Alias<strip_all>;
112 def alias_strip_S: Flag<["-"], "S">, Alias<strip_debug>;
113 def alias_undefined_u: JoinedOrSeparate<["-"], "u">, Alias<undefined>;
114
115 // Ignored options
116 def: Joined<["-"], "O">;
117 def: F<"build-id">;
118 def: F<"disable-auto-image-base">;
119 def: F<"enable-auto-image-base">;
120 def: F<"end-group">;
121 def: Flag<["--"], "full-shutdown">;
122 def: F<"high-entropy-va">;
123 def: S<"major-image-version">;
124 def: S<"minor-image-version">;
125 def: F<"nxcompat">;
126 def: F<"pic-executable">;
127 def: S<"plugin">;
128 def: J<"plugin=">;
129 def: S<"plugin-opt">;
130 def: J<"plugin-opt=">;
131 def: J<"sysroot">;
132 def: F<"start-group">;
133 def: F<"tsaware">;