Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 1 | include "llvm/Option/OptParser.td" |
| 2 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 3 | // Convenience classes for long options which only accept two dashes. For lld |
| 4 | // specific or newer long options, we prefer two dashes to avoid collision with |
| 5 | // short options. For many others, we have to accept both forms to be compatible |
| 6 | // with GNU ld. |
| 7 | class FF<string name> : Flag<["--"], name>; |
| 8 | class JJ<string name>: Joined<["--"], name>; |
| 9 | |
| 10 | multiclass EEq<string name, string help> { |
| 11 | def NAME: Separate<["--"], name>; |
| 12 | def NAME # _eq: Joined<["--"], name # "=">, Alias<!cast<Separate>(NAME)>, |
| 13 | HelpText<help>; |
| 14 | } |
| 15 | |
| 16 | multiclass BB<string name, string help1, string help2> { |
| 17 | def NAME: Flag<["--"], name>, HelpText<help1>; |
| 18 | def no_ # NAME: Flag<["--"], "no-" # name>, HelpText<help2>; |
| 19 | } |
| 20 | |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 21 | // For options whose names are multiple letters, either one dash or |
| 22 | // two can precede the option name except those that start with 'o'. |
| 23 | class F<string name>: Flag<["--", "-"], name>; |
| 24 | class J<string name>: Joined<["--", "-"], name>; |
| 25 | class S<string name>: Separate<["--", "-"], name>; |
| 26 | |
Sam Clegg | ad980a7 | 2018-10-22 08:34:37 | [diff] [blame] | 27 | multiclass Eq<string name, string help> { |
| 28 | def NAME: Separate<["--", "-"], name>; |
| 29 | def NAME # _eq: Joined<["--", "-"], name # "=">, Alias<!cast<Separate>(NAME)>, |
| 30 | HelpText<help>; |
Sam Clegg | 31de2f0 | 2017-12-07 03:19:53 | [diff] [blame] | 31 | } |
| 32 | |
Nicholas Wilson | 08cff61 | 2018-03-13 13:12:03 | [diff] [blame] | 33 | multiclass B<string name, string help1, string help2> { |
| 34 | def NAME: Flag<["--", "-"], name>, HelpText<help1>; |
| 35 | def no_ # NAME: Flag<["--", "-"], "no-" # name>, HelpText<help2>; |
| 36 | } |
| 37 | |
Sam Clegg | bfb7534 | 2018-11-15 00:37:21 | [diff] [blame] | 38 | // The following flags are shared with the ELF linker |
Sam Clegg | 2513407 | 2020-10-07 21:48:37 | [diff] [blame] | 39 | def Bsymbolic: F<"Bsymbolic">, HelpText<"Bind defined symbols locally">; |
| 40 | |
Sam Clegg | 0a9756f | 2022-10-03 15:31:23 | [diff] [blame] | 41 | def Bdynamic: F<"Bdynamic">, HelpText<"Link against shared libraries (default)">; |
| 42 | |
| 43 | def Bstatic: F<"Bstatic">, HelpText<"Do not link against shared libraries">; |
| 44 | |
Nico Weber | baa2aa2 | 2020-11-17 17:15:42 | [diff] [blame] | 45 | defm color_diagnostics: B<"color-diagnostics", |
| 46 | "Alias for --color-diagnostics=always", |
| 47 | "Alias for --color-diagnostics=never">; |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 48 | def color_diagnostics_eq: J<"color-diagnostics=">, |
Nico Weber | baa2aa2 | 2020-11-17 17:15:42 | [diff] [blame] | 49 | HelpText<"Use colors in diagnostics (default: auto)">, |
| 50 | MetaVarName<"[auto,always,never]">; |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 51 | |
Sam Clegg | 30161dc | 2018-08-17 19:42:46 | [diff] [blame] | 52 | def compress_relocations: F<"compress-relocations">, |
| 53 | HelpText<"Compress the relocation targets in the code section.">; |
| 54 | |
Nicholas Wilson | 08cff61 | 2018-03-13 13:12:03 | [diff] [blame] | 55 | defm demangle: B<"demangle", |
| 56 | "Demangle symbol names", |
| 57 | "Do not demangle symbol names">; |
| 58 | |
Sam Clegg | 35be7ff | 2019-05-24 13:28:27 | [diff] [blame] | 59 | def emit_relocs: F<"emit-relocs">, HelpText<"Generate relocations in output">; |
| 60 | |
Sam Clegg | 206884b | 2020-05-01 16:14:59 | [diff] [blame] | 61 | def error_unresolved_symbols: F<"error-unresolved-symbols">, |
| 62 | HelpText<"Report unresolved symbols as errors">; |
| 63 | |
Sam Clegg | 305b034 | 2018-09-27 21:06:25 | [diff] [blame] | 64 | defm export_dynamic: B<"export-dynamic", |
| 65 | "Put symbols in the dynamic symbol table", |
| 66 | "Do not put symbols in the dynamic symbol table (default)">; |
Sam Clegg | 4e62418 | 2018-09-25 21:50:15 | [diff] [blame] | 67 | |
Sam Clegg | b839f15 | 2018-01-28 19:57:04 | [diff] [blame] | 68 | def entry: S<"entry">, MetaVarName<"<entry>">, |
| 69 | HelpText<"Name of entry point symbol">; |
| 70 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 71 | defm error_limit: |
| 72 | EEq<"error-limit", "Maximum number of errors to emit before stopping (0 = no limit)">; |
Sam Clegg | b839f15 | 2018-01-28 19:57:04 | [diff] [blame] | 73 | |
| 74 | def fatal_warnings: F<"fatal-warnings">, |
| 75 | HelpText<"Treat warnings as errors">; |
| 76 | |
Nicholas Wilson | 88d9ffc | 2018-03-13 13:16:15 | [diff] [blame] | 77 | defm gc_sections: B<"gc-sections", |
| 78 | "Enable garbage collection of unused sections", |
| 79 | "Disable garbage collection of unused sections">; |
Sam Clegg | 0362633 | 2018-01-31 01:45:47 | [diff] [blame] | 80 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 81 | defm merge_data_segments: BB<"merge-data-segments", |
Sam Clegg | 6684476 | 2018-05-10 18:23:51 | [diff] [blame] | 82 | "Enable merging data segments", |
| 83 | "Disable merging data segments">; |
| 84 | |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 85 | def help: F<"help">, HelpText<"Print option help">; |
| 86 | |
Sam Clegg | 0a9756f | 2022-10-03 15:31:23 | [diff] [blame] | 87 | def library: JoinedOrSeparate<["-"], "l">, MetaVarName<"<libName>">, |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 88 | HelpText<"Root name of library to use">; |
| 89 | |
Sam Clegg | 0a9756f | 2022-10-03 15:31:23 | [diff] [blame] | 90 | def library_path: JoinedOrSeparate<["-"], "L">, MetaVarName<"<dir>">, |
Sam Clegg | b839f15 | 2018-01-28 19:57:04 | [diff] [blame] | 91 | HelpText<"Add a directory to the library search path">; |
| 92 | |
Wouter van Oortmerssen | b9a539c | 2020-06-15 22:31:10 | [diff] [blame] | 93 | def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">; |
| 94 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 95 | defm mllvm: Eq<"mllvm", "Additional arguments to forward to LLVM's option processing">; |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 96 | |
Sam Clegg | cc2da55 | 2020-03-27 23:52:27 | [diff] [blame] | 97 | defm Map: Eq<"Map", "Print a link map to the specified file">; |
| 98 | |
Sam Clegg | b839f15 | 2018-01-28 19:57:04 | [diff] [blame] | 99 | def no_fatal_warnings: F<"no-fatal-warnings">; |
Sam Clegg | b862159 | 2017-11-30 01:40:08 | [diff] [blame] | 100 | |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 101 | def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">, |
| 102 | HelpText<"Path to file to write output">; |
| 103 | |
Sam Clegg | fb983cd | 2018-05-18 23:28:05 | [diff] [blame] | 104 | def O: JoinedOrSeparate<["-"], "O">, HelpText<"Optimize output file size">; |
| 105 | |
Sam Clegg | bfb7534 | 2018-11-15 00:37:21 | [diff] [blame] | 106 | defm pie: B<"pie", |
| 107 | "Create a position independent executable", |
| 108 | "Do not create a position independent executable (default)">; |
| 109 | |
Nicholas Wilson | 88d9ffc | 2018-03-13 13:16:15 | [diff] [blame] | 110 | defm print_gc_sections: B<"print-gc-sections", |
| 111 | "List removed unused sections", |
| 112 | "Do not list removed unused sections">; |
Sam Clegg | 0362633 | 2018-01-31 01:45:47 | [diff] [blame] | 113 | |
Sam Clegg | cc2da55 | 2020-03-27 23:52:27 | [diff] [blame] | 114 | def print_map: F<"print-map">, |
| 115 | HelpText<"Print a link map to the standard output">; |
| 116 | |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 117 | def relocatable: F<"relocatable">, HelpText<"Create relocatable object file">; |
| 118 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 119 | defm reproduce: EEq<"reproduce", "Dump linker invocation and input files for debugging">; |
Rui Ueyama | 35150bb | 2019-05-21 11:52:14 | [diff] [blame] | 120 | |
Sam Clegg | 928e9e1 | 2020-03-04 19:29:45 | [diff] [blame] | 121 | defm rsp_quoting: Eq<"rsp-quoting", "Quoting style for response files">, |
| 122 | MetaVarName<"[posix,windows]">; |
| 123 | |
Sam Clegg | bfb7534 | 2018-11-15 00:37:21 | [diff] [blame] | 124 | def shared: F<"shared">, HelpText<"Build a shared object">; |
| 125 | |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 126 | def strip_all: F<"strip-all">, HelpText<"Strip all symbols">; |
| 127 | |
| 128 | def strip_debug: F<"strip-debug">, HelpText<"Strip debugging information">; |
| 129 | |
Fangrui Song | eb4663d | 2020-03-17 19:40:19 | [diff] [blame] | 130 | defm threads |
| 131 | : Eq<"threads", "Number of threads. '1' disables multi-threading. By " |
| 132 | "default all available hardware threads are used">; |
Sam Clegg | b839f15 | 2018-01-28 19:57:04 | [diff] [blame] | 133 | |
Sam Clegg | 1f3f774 | 2019-02-06 02:35:18 | [diff] [blame] | 134 | def trace: F<"trace">, HelpText<"Print the names of the input files">; |
| 135 | |
| 136 | defm trace_symbol: Eq<"trace-symbol", "Trace references to symbols">; |
| 137 | |
Sam Clegg | ad980a7 | 2018-10-22 08:34:37 | [diff] [blame] | 138 | defm undefined: Eq<"undefined", "Force undefined symbol during linking">; |
Sam Clegg | 31de2f0 | 2017-12-07 03:19:53 | [diff] [blame] | 139 | |
Sam Clegg | 206884b | 2020-05-01 16:14:59 | [diff] [blame] | 140 | defm unresolved_symbols: |
| 141 | Eq<"unresolved-symbols", "Determine how to handle unresolved symbols">; |
| 142 | |
Sam Clegg | b839f15 | 2018-01-28 19:57:04 | [diff] [blame] | 143 | def v: Flag<["-"], "v">, HelpText<"Display the version number">; |
| 144 | |
| 145 | def verbose: F<"verbose">, HelpText<"Verbose mode">; |
| 146 | |
| 147 | def version: F<"version">, HelpText<"Display the version number and exit">; |
| 148 | |
Sam Clegg | 206884b | 2020-05-01 16:14:59 | [diff] [blame] | 149 | def warn_unresolved_symbols: F<"warn-unresolved-symbols">, |
| 150 | HelpText<"Report unresolved symbols as warnings">; |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 151 | |
Sam Clegg | a5ca34e | 2019-05-24 14:14:25 | [diff] [blame] | 152 | defm wrap: Eq<"wrap", "Use wrapper functions for symbol">, |
| 153 | MetaVarName<"<symbol>=<symbol>">; |
| 154 | |
Sam Clegg | 206884b | 2020-05-01 16:14:59 | [diff] [blame] | 155 | def z: JoinedOrSeparate<["-"], "z">, MetaVarName<"<option>">, |
| 156 | HelpText<"Linker option extensions">; |
| 157 | |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 158 | // The follow flags are unique to wasm |
| 159 | |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 160 | def allow_undefined: F<"allow-undefined">, |
Nico Weber | 9f90347 | 2021-10-27 13:52:17 | [diff] [blame] | 161 | HelpText<"Allow undefined symbols in linked binary. " |
| 162 | "This options is equivalent to --import-undefined " |
| 163 | "and --unresolved-symbols=ignore-all">; |
Sam Clegg | 758633f | 2021-05-27 21:27:10 | [diff] [blame] | 164 | |
| 165 | def import_undefined: F<"import-undefined">, |
| 166 | HelpText<"Turn undefined symbols into imports where possible">; |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 167 | |
| 168 | def allow_undefined_file: J<"allow-undefined-file=">, |
| 169 | HelpText<"Allow symbols listed in <file> to be undefined in linked binary">; |
| 170 | |
Sam Clegg | b839f15 | 2018-01-28 19:57:04 | [diff] [blame] | 171 | def allow_undefined_file_s: Separate<["-"], "allow-undefined-file">, |
| 172 | Alias<allow_undefined_file>; |
| 173 | |
Sam Clegg | ad980a7 | 2018-10-22 08:34:37 | [diff] [blame] | 174 | defm export: Eq<"export", "Force a symbol to be exported">; |
Sam Clegg | b839f15 | 2018-01-28 19:57:04 | [diff] [blame] | 175 | |
Sam Clegg | a6f4064 | 2021-04-05 15:00:30 | [diff] [blame] | 176 | defm export_if_defined: Eq<"export-if-defined", |
| 177 | "Force a symbol to be exported, if it is defined in the input">; |
| 178 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 179 | def export_all: FF<"export-all">, |
Sam Clegg | 177b458 | 2018-06-07 01:27:07 | [diff] [blame] | 180 | HelpText<"Export all symbols (normally combined with --no-gc-sections)">; |
| 181 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 182 | def export_table: FF<"export-table">, |
Nicholas Wilson | 874eedd | 2018-03-27 17:38:51 | [diff] [blame] | 183 | HelpText<"Export function table to the environment">; |
| 184 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 185 | def growable_table: FF<"growable-table">, |
Jacob Gravelle | 92ed86d | 2019-08-27 22:58:21 | [diff] [blame] | 186 | HelpText<"Remove maximum size from function table, allowing table to grow">; |
| 187 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 188 | def global_base: JJ<"global-base=">, |
Sam Clegg | b839f15 | 2018-01-28 19:57:04 | [diff] [blame] | 189 | HelpText<"Where to start to place global data">; |
| 190 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 191 | def import_memory: FF<"import-memory">, |
Dan Gohman | d4c8a0e | 2022-10-04 19:50:10 | [diff] [blame] | 192 | HelpText<"Import the module's memory from the default module of \"env\" with the name \"memory\".">; |
| 193 | def import_memory_with_name: JJ<"import-memory=">, |
| 194 | HelpText<"Import the module's memory from the passed module with the passed name.">, |
| 195 | MetaVarName<"<module>,<name>">; |
| 196 | |
| 197 | def export_memory: FF<"export-memory">, |
| 198 | HelpText<"Export the module's memory with the default name of \"memory\"">; |
| 199 | def export_memory_with_name: JJ<"export-memory=">, |
| 200 | HelpText<"Export the module's memory with the passed name">; |
Sam Clegg | b839f15 | 2018-01-28 19:57:04 | [diff] [blame] | 201 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 202 | def shared_memory: FF<"shared-memory">, |
Derek Schuff | 3bea8bc | 2018-11-06 17:59:32 | [diff] [blame] | 203 | HelpText<"Use shared linear memory">; |
| 204 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 205 | def import_table: FF<"import-table">, |
Nicholas Wilson | 874eedd | 2018-03-27 17:38:51 | [diff] [blame] | 206 | HelpText<"Import function table from the environment">; |
| 207 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 208 | def initial_memory: JJ<"initial-memory=">, |
Sam Clegg | b839f15 | 2018-01-28 19:57:04 | [diff] [blame] | 209 | HelpText<"Initial size of the linear memory">; |
| 210 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 211 | def max_memory: JJ<"max-memory=">, |
Sam Clegg | b839f15 | 2018-01-28 19:57:04 | [diff] [blame] | 212 | HelpText<"Maximum size of the linear memory">; |
| 213 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 214 | def no_entry: FF<"no-entry">, |
Sam Clegg | b839f15 | 2018-01-28 19:57:04 | [diff] [blame] | 215 | HelpText<"Do not output any entry point">; |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 216 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 217 | def stack_first: FF<"stack-first">, |
Sam Clegg | a0f095e | 2018-05-03 17:21:53 | [diff] [blame] | 218 | HelpText<"Place stack at start of linear memory rather than after data">; |
| 219 | |
Sam Clegg | 8adf7ac | 2018-07-23 23:51:19 | [diff] [blame] | 220 | defm whole_archive: B<"whole-archive", |
| 221 | "Force load of all members in a static library", |
| 222 | "Do not force load of all members in a static library (default)">; |
| 223 | |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 224 | defm check_features: BB<"check-features", |
Thomas Lively | 82de51a | 2019-03-26 04:11:05 | [diff] [blame] | 225 | "Check feature compatibility of linked objects (default)", |
| 226 | "Ignore feature compatibility of linked objects">; |
| 227 | |
| 228 | def features: CommaJoined<["--", "-"], "features=">, |
| 229 | HelpText<"Comma-separated used features, inferred from input objects by default.">; |
| 230 | |
Sam Clegg | c07e838 | 2022-10-12 23:39:47 | [diff] [blame] | 231 | def extra_features: CommaJoined<["--", "-"], "extra-features=">, |
| 232 | HelpText<"Comma-separated list of features to add to the default set of features inferred from input objects.">; |
| 233 | |
Sam Clegg | c94d393 | 2017-11-17 18:14:09 | [diff] [blame] | 234 | // Aliases |
Sam Clegg | 305b034 | 2018-09-27 21:06:25 | [diff] [blame] | 235 | def: JoinedOrSeparate<["-"], "e">, Alias<entry>; |
| 236 | def: J<"entry=">, Alias<entry>; |
Sam Clegg | 0a9756f | 2022-10-03 15:31:23 | [diff] [blame] | 237 | def: F<"call_shared">, Alias<Bdynamic>, HelpText<"Alias for --Bdynamic">; |
| 238 | def: F<"dy">, Alias<Bdynamic>, HelpText<"Alias for --Bdynamic">; |
| 239 | def: F<"dn">, Alias<Bstatic>, HelpText<"Alias for --Bstatic">; |
| 240 | def: F<"non_shared">, Alias<Bstatic>, HelpText<"Alias for --Bstatic">; |
| 241 | def: F<"static">, Alias<Bstatic>, HelpText<"Alias for --Bstatic">; |
Sam Clegg | 305b034 | 2018-09-27 21:06:25 | [diff] [blame] | 242 | def: Flag<["-"], "E">, Alias<export_dynamic>, HelpText<"Alias for --export-dynamic">; |
| 243 | def: Flag<["-"], "i">, Alias<initial_memory>; |
Sam Clegg | 0a9756f | 2022-10-03 15:31:23 | [diff] [blame] | 244 | def: Separate<["--", "-"], "library">, Alias<library>; |
| 245 | def: Joined<["--", "-"], "library=">, Alias<library>; |
| 246 | def: Separate<["--", "-"], "library-path">, Alias<library_path>; |
| 247 | def: Joined<["--", "-"], "library-path=">, Alias<library_path>; |
Sam Clegg | cc2da55 | 2020-03-27 23:52:27 | [diff] [blame] | 248 | def: Flag<["-"], "M">, Alias<print_map>, HelpText<"Alias for --print-map">; |
Sam Clegg | 305b034 | 2018-09-27 21:06:25 | [diff] [blame] | 249 | def: Flag<["-"], "r">, Alias<relocatable>; |
Sam Clegg | 59d52f8 | 2018-10-31 19:30:43 | [diff] [blame] | 250 | def: Flag<["-"], "s">, Alias<strip_all>, HelpText<"Alias for --strip-all">; |
| 251 | def: Flag<["-"], "S">, Alias<strip_debug>, HelpText<"Alias for --strip-debug">; |
Sam Clegg | 1f3f774 | 2019-02-06 02:35:18 | [diff] [blame] | 252 | def: Flag<["-"], "t">, Alias<trace>, HelpText<"Alias for --trace">; |
| 253 | def: JoinedOrSeparate<["-"], "y">, Alias<trace_symbol>, HelpText<"Alias for --trace-symbol">; |
Sam Clegg | 305b034 | 2018-09-27 21:06:25 | [diff] [blame] | 254 | def: JoinedOrSeparate<["-"], "u">, Alias<undefined>; |
Sam Clegg | c729c1b | 2018-05-30 18:07:52 | [diff] [blame] | 255 | |
| 256 | // LTO-related options. |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 257 | def lto_O: JJ<"lto-O">, MetaVarName<"<opt-level>">, |
Sam Clegg | c729c1b | 2018-05-30 18:07:52 | [diff] [blame] | 258 | HelpText<"Optimization level for LTO">; |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 259 | def lto_partitions: JJ<"lto-partitions=">, |
Sam Clegg | c729c1b | 2018-05-30 18:07:52 | [diff] [blame] | 260 | HelpText<"Number of LTO codegen partitions">; |
| 261 | def disable_verify: F<"disable-verify">; |
Sam Clegg | 299b0e5 | 2021-01-18 19:39:28 | [diff] [blame] | 262 | def save_temps: F<"save-temps">, HelpText<"Save intermediate LTO compilation results">; |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 263 | def thinlto_cache_dir: JJ<"thinlto-cache-dir=">, |
Sam Clegg | c729c1b | 2018-05-30 18:07:52 | [diff] [blame] | 264 | HelpText<"Path to ThinLTO cached object file directory">; |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 265 | defm thinlto_cache_policy: EEq<"thinlto-cache-policy", "Pruning policy for the ThinLTO cache">; |
| 266 | def thinlto_jobs: JJ<"thinlto-jobs=">, |
Fangrui Song | eb4663d | 2020-03-17 19:40:19 | [diff] [blame] | 267 | HelpText<"Number of ThinLTO jobs. Default to --threads=">; |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 268 | def no_lto_legacy_pass_manager: FF<"no-lto-legacy-pass-manager">, |
Nikita Popov | b8f50ab | 2022-04-06 14:21:20 | [diff] [blame] | 269 | HelpText<"Use new pass manager">; |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 270 | def lto_debug_pass_manager: FF<"lto-debug-pass-manager">, |
Arthur Eubanks | 1314a49 | 2020-12-01 20:22:27 | [diff] [blame] | 271 | HelpText<"Debug new pass manager">; |
Dan Gohman | 46a3268 | 2020-06-12 19:05:40 | [diff] [blame] | 272 | |
| 273 | // Experimental PIC mode. |
Sam Clegg | 87628f5 | 2022-05-26 21:05:05 | [diff] [blame] | 274 | def experimental_pic: FF<"experimental-pic">, |
Dan Gohman | 46a3268 | 2020-06-12 19:05:40 | [diff] [blame] | 275 | HelpText<"Enable Experimental PIC">; |