xref: /freebsd/contrib/llvm-project/lld/COFF/Options.td (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
10b57cec5SDimitry Andricinclude "llvm/Option/OptParser.td"
20b57cec5SDimitry Andric
30b57cec5SDimitry Andric// link.exe accepts options starting with either a dash or a slash.
40b57cec5SDimitry Andric
50b57cec5SDimitry Andric// Flag that takes no arguments.
60b57cec5SDimitry Andricclass F<string name> : Flag<["/", "-", "/?", "-?"], name>;
70b57cec5SDimitry Andric
80b57cec5SDimitry Andric// Flag that takes one argument after ":".
90b57cec5SDimitry Andricclass P<string name, string help> :
100b57cec5SDimitry Andric      Joined<["/", "-", "/?", "-?"], name#":">, HelpText<help>;
110b57cec5SDimitry Andric
12e8d8bef9SDimitry Andric// Same as P<> above, but without help texts, for private undocumented
13e8d8bef9SDimitry Andric// options.
14e8d8bef9SDimitry Andricclass P_priv<string name> :
15e8d8bef9SDimitry Andric      Joined<["/", "-", "/?", "-?"], name#":">;
16e8d8bef9SDimitry Andric
170b57cec5SDimitry Andric// Boolean flag which can be suffixed by ":no". Using it unsuffixed turns the
180b57cec5SDimitry Andric// flag on and using it suffixed by ":no" turns it off.
190b57cec5SDimitry Andricmulticlass B<string name, string help_on, string help_off> {
200b57cec5SDimitry Andric  def "" : F<name>, HelpText<help_on>;
210b57cec5SDimitry Andric  def _no : F<name#":no">, HelpText<help_off>;
220b57cec5SDimitry Andric}
230b57cec5SDimitry Andric
245ffd83dbSDimitry Andric// Same as B<> above, but without help texts, for private undocumented
255ffd83dbSDimitry Andric// options.
265ffd83dbSDimitry Andricmulticlass B_priv<string name> {
275ffd83dbSDimitry Andric  def "" : F<name>;
285ffd83dbSDimitry Andric  def _no : F<name#":no">;
295ffd83dbSDimitry Andric}
305ffd83dbSDimitry Andric
310b57cec5SDimitry Andricdef align   : P<"align", "Section alignment">;
320b57cec5SDimitry Andricdef aligncomm : P<"aligncomm", "Set common symbol alignment">;
330b57cec5SDimitry Andricdef alternatename : P<"alternatename", "Define weak alias">;
340b57cec5SDimitry Andricdef base    : P<"base", "Base address of the program">;
350b57cec5SDimitry Andricdef color_diagnostics: Flag<["--"], "color-diagnostics">,
36e8d8bef9SDimitry Andric    HelpText<"Alias for --color-diagnostics=always">;
37e8d8bef9SDimitry Andricdef no_color_diagnostics: Flag<["--"], "no-color-diagnostics">,
38e8d8bef9SDimitry Andric    HelpText<"Alias for --color-diagnostics=never">;
390b57cec5SDimitry Andricdef color_diagnostics_eq: Joined<["--"], "color-diagnostics=">,
40e8d8bef9SDimitry Andric    HelpText<"Use colors in diagnostics (default: auto)">,
41e8d8bef9SDimitry Andric    MetaVarName<"[auto,always,never]">;
420b57cec5SDimitry Andricdef defaultlib : P<"defaultlib", "Add the library to the list of input files">;
430b57cec5SDimitry Andricdef delayload : P<"delayload", "Delay loaded DLL name">;
4481ad6265SDimitry Andricdef diasdkdir : P<"diasdkdir", "Set the location of the DIA SDK">;
4506c3fb27SDimitry Andricdef dwodir : P<"dwodir",
4606c3fb27SDimitry Andric    "Directory to store .dwo files when LTO and debug fission are used">;
470b57cec5SDimitry Andricdef entry   : P<"entry", "Name of entry point symbol">;
480b57cec5SDimitry Andricdef errorlimit : P<"errorlimit",
490b57cec5SDimitry Andric    "Maximum number of errors to emit before stopping (0 = no limit)">;
5061cfbce3SDimitry Andricdef exclude_symbols  : P<"exclude-symbols", "Exclude symbols from automatic export">,
5161cfbce3SDimitry Andric    MetaVarName<"<symbol[,symbol,...]>">;
520b57cec5SDimitry Andricdef export  : P<"export", "Export a function">;
530b57cec5SDimitry Andric// No help text because /failifmismatch is not intended to be used by the user.
540b57cec5SDimitry Andricdef failifmismatch : P<"failifmismatch", "">;
550b57cec5SDimitry Andricdef filealign : P<"filealign", "Section alignment in the output file">;
560b57cec5SDimitry Andricdef functionpadmin : F<"functionpadmin">;
5785868e8aSDimitry Andricdef functionpadmin_opt : P<"functionpadmin",
5885868e8aSDimitry Andric    "Prepares an image for hotpatching">;
595f757f3fSDimitry Andricdef dependentloadflag : F<"dependentloadflag">;
605f757f3fSDimitry Andricdef dependentloadflag_opt : P<"dependentloadflag",
615f757f3fSDimitry Andric    "Sets the default load flags used to resolve the statically linked imports of a module">;
620b57cec5SDimitry Andricdef guard   : P<"guard", "Control flow guard">;
630b57cec5SDimitry Andricdef heap    : P<"heap", "Size of the heap">;
640b57cec5SDimitry Andricdef ignore : P<"ignore", "Specify warning codes to ignore">;
650b57cec5SDimitry Andricdef implib  : P<"implib", "Import library name">;
6681ad6265SDimitry Andricdef noimplib : F<"noimplib">,
6781ad6265SDimitry Andric    HelpText<"Don't output an import lib">;
680b57cec5SDimitry Andricdef lib : F<"lib">,
690b57cec5SDimitry Andric    HelpText<"Act like lib.exe; must be first argument if present">;
700b57cec5SDimitry Andricdef libpath : P<"libpath", "Additional library search path">;
71e8d8bef9SDimitry Andricdef linkrepro : Joined<["/", "-", "/?", "-?"], "linkrepro:">,
72e8d8bef9SDimitry Andric    MetaVarName<"directory">,
73e8d8bef9SDimitry Andric    HelpText<"Write repro.tar containing inputs and command to reproduce link">;
7485868e8aSDimitry Andricdef lldignoreenv : F<"lldignoreenv">,
7585868e8aSDimitry Andric    HelpText<"Ignore environment variables like %LIB%">;
7685868e8aSDimitry Andricdef lldltocache : P<"lldltocache",
7785868e8aSDimitry Andric    "Path to ThinLTO cached object file directory">;
7885868e8aSDimitry Andricdef lldltocachepolicy : P<"lldltocachepolicy",
7985868e8aSDimitry Andric    "Pruning policy for the ThinLTO cache">;
800b57cec5SDimitry Andricdef lldsavetemps : F<"lldsavetemps">,
81e8d8bef9SDimitry Andric    HelpText<"Save intermediate LTO compilation results">;
82*0fca6ea1SDimitry Andricdef lto_sample_profile: P<"lto-sample-profile", "Sample profile file path">;
830b57cec5SDimitry Andricdef machine : P<"machine", "Specify target platform">;
840b57cec5SDimitry Andricdef merge   : P<"merge", "Combine sections">;
850b57cec5SDimitry Andricdef mllvm   : P<"mllvm", "Options to pass to LLVM">;
860b57cec5SDimitry Andricdef nodefaultlib : P<"nodefaultlib", "Remove a default library">;
870b57cec5SDimitry Andricdef opt     : P<"opt", "Control optimizations">;
880b57cec5SDimitry Andricdef order   : P<"order", "Put functions in order">;
890b57cec5SDimitry Andricdef out     : P<"out", "Path to file to write output">;
900b57cec5SDimitry Andricdef natvis : P<"natvis", "Path to natvis file to embed in the PDB">;
910b57cec5SDimitry Andricdef pdb : P<"pdb", "PDB file path">;
920b57cec5SDimitry Andricdef pdbaltpath : P<"pdbaltpath", "PDB file path to embed in the image">;
93349cc55cSDimitry Andricdef pdbpagesize : P<"pdbpagesize", "PDB page size">;
94349cc55cSDimitry Andricdef pdbstripped : P<"pdbstripped", "Stripped PDB file path">;
955ffd83dbSDimitry Andricdef pdbstream : Joined<["/", "-", "/?", "-?"], "pdbstream:">,
965ffd83dbSDimitry Andric    MetaVarName<"<name>=<file>">,
975ffd83dbSDimitry Andric    HelpText<"Embed the contents of <file> in the PDB as named stream <name>">;
980b57cec5SDimitry Andricdef section : P<"section", "Specify section attributes">;
990b57cec5SDimitry Andricdef stack   : P<"stack", "Size of the stack">;
1000b57cec5SDimitry Andricdef stub    : P<"stub", "Specify DOS stub file">;
1010b57cec5SDimitry Andricdef subsystem : P<"subsystem", "Specify subsystem">;
1020b57cec5SDimitry Andricdef timestamp : P<"timestamp", "Specify the PE header timestamp">;
10381ad6265SDimitry Andricdef vctoolsdir : P<"vctoolsdir", "Set the location of the VC tools">;
10481ad6265SDimitry Andricdef vctoolsversion : P<"vctoolsversion",
10581ad6265SDimitry Andric    "Specify which VC tools version to use">;
1060b57cec5SDimitry Andricdef version : P<"version", "Specify a version number in the PE header">;
10785868e8aSDimitry Andricdef wholearchive_file : P<"wholearchive",
10885868e8aSDimitry Andric    "Include all object files from this library">;
10981ad6265SDimitry Andricdef winsdkdir : P<"winsdkdir", "Set the location of the Windows SDK">;
11081ad6265SDimitry Andricdef winsdkversion : P<"winsdkversion", "Specify which SDK version to use">;
11181ad6265SDimitry Andricdef winsysroot : P<"winsysroot",
11281ad6265SDimitry Andric    "Adds several subdirectories to the library search paths">;
1130b57cec5SDimitry Andric
1140b57cec5SDimitry Andricdef disallowlib : Joined<["/", "-", "/?", "-?"], "disallowlib:">,
1150b57cec5SDimitry Andric    Alias<nodefaultlib>;
1160b57cec5SDimitry Andric
1170b57cec5SDimitry Andricdef manifest : F<"manifest">, HelpText<"Create .manifest file">;
1180b57cec5SDimitry Andricdef manifest_colon : P<
1190b57cec5SDimitry Andric    "manifest",
1200b57cec5SDimitry Andric    "NO disables manifest output; EMBED[,ID=#] embeds manifest as resource in the image">;
1210b57cec5SDimitry Andricdef manifestuac : P<"manifestuac", "User access control">;
1220b57cec5SDimitry Andricdef manifestfile : P<"manifestfile", "Manifest output path, with /manifest">;
1230b57cec5SDimitry Andricdef manifestdependency : P<
1240b57cec5SDimitry Andric    "manifestdependency",
1250b57cec5SDimitry Andric    "Attributes for <dependency> element in manifest file; implies /manifest">;
1260b57cec5SDimitry Andricdef manifestinput : P<
1270b57cec5SDimitry Andric    "manifestinput",
1280b57cec5SDimitry Andric    "Additional manifest inputs; only valid with /manifest:embed">;
1290b57cec5SDimitry Andric
1300b57cec5SDimitry Andric// We cannot use multiclass P because class name "incl" is different
1310b57cec5SDimitry Andric// from its command line option name. We do this because "include" is
1320b57cec5SDimitry Andric// a reserved keyword in tablegen.
1330b57cec5SDimitry Andricdef incl : Joined<["/", "-", "/?", "-?"], "include:">,
1340b57cec5SDimitry Andric    HelpText<"Force symbol to be added to symbol table as undefined one">;
1350b57cec5SDimitry Andric
1360b57cec5SDimitry Andric// "def" is also a keyword.
1370b57cec5SDimitry Andricdef deffile : Joined<["/", "-", "/?", "-?"], "def:">,
1380b57cec5SDimitry Andric    HelpText<"Use module-definition file">;
1390b57cec5SDimitry Andric
1400b57cec5SDimitry Andricdef debug : F<"debug">, HelpText<"Embed a symbol table in the image">;
1410b57cec5SDimitry Andricdef debug_opt : P<"debug", "Embed a symbol table in the image with option">;
1420b57cec5SDimitry Andricdef debugtype : P<"debugtype", "Debug Info Options">;
1430b57cec5SDimitry Andricdef dll : F<"dll">, HelpText<"Create a DLL">;
144480093f4SDimitry Andricdef driver : F<"driver">, HelpText<"Generate a Windows NT Kernel Mode Driver">;
145480093f4SDimitry Andricdef driver_wdm : F<"driver:wdm">,
146480093f4SDimitry Andric    HelpText<"Set IMAGE_FILE_UP_SYSTEM_ONLY bit in PE header">;
147480093f4SDimitry Andricdef driver_uponly : F<"driver:uponly">,
148480093f4SDimitry Andric    HelpText<"Set IMAGE_DLL_CHARACTERISTICS_WDM_DRIVER bit in PE header">;
149480093f4SDimitry Andricdef driver_wdm_uponly : F<"driver:wdm,uponly">;
150480093f4SDimitry Andricdef driver_uponly_wdm : F<"driver:uponly,wdm">;
1510b57cec5SDimitry Andricdef nodefaultlib_all : F<"nodefaultlib">,
1520b57cec5SDimitry Andric    HelpText<"Remove all default libraries">;
1530b57cec5SDimitry Andricdef noentry : F<"noentry">,
1540b57cec5SDimitry Andric    HelpText<"Don't add reference to DllMainCRTStartup; only valid with /dll">;
1550b57cec5SDimitry Andricdef profile : F<"profile">;
1560b57cec5SDimitry Andricdef repro : F<"Brepro">,
1570b57cec5SDimitry Andric    HelpText<"Use a hash of the executable as the PE header timestamp">;
158e8d8bef9SDimitry Andricdef reproduce : Joined<["/", "-", "/?", "-?"], "reproduce:">,
159e8d8bef9SDimitry Andric    MetaVarName<"filename">,
160e8d8bef9SDimitry Andric    HelpText<"Write tar file containing inputs and command to reproduce link">;
1610b57cec5SDimitry Andricdef swaprun : P<"swaprun",
1620b57cec5SDimitry Andric  "Comma-separated list of 'cd' or 'net'">;
1630b57cec5SDimitry Andricdef swaprun_cd : F<"swaprun:cd">, Alias<swaprun>, AliasArgs<["cd"]>,
1640b57cec5SDimitry Andric  HelpText<"Make loader run output binary from swap instead of from CD">;
1650b57cec5SDimitry Andricdef swaprun_net : F<"swaprun:net">, Alias<swaprun>, AliasArgs<["net"]>,
1660b57cec5SDimitry Andric  HelpText<"Make loader run output binary from swap instead of from network">;
1670b57cec5SDimitry Andricdef verbose : F<"verbose">;
16885868e8aSDimitry Andricdef wholearchive_flag : F<"wholearchive">,
16985868e8aSDimitry Andric    HelpText<"Include all object files from all libraries">;
170bdd1243dSDimitry Andricdef release : F<"release">,
171bdd1243dSDimitry Andric    HelpText<"Set the Checksum in the header of an PE file">;
1720b57cec5SDimitry Andric
1730b57cec5SDimitry Andricdef force : F<"force">,
17485868e8aSDimitry Andric    HelpText<"Allow undefined and multiply defined symbols">;
1750b57cec5SDimitry Andricdef force_unresolved : F<"force:unresolved">,
1760b57cec5SDimitry Andric    HelpText<"Allow undefined symbols when creating executables">;
1770b57cec5SDimitry Andricdef force_multiple : F<"force:multiple">,
1780b57cec5SDimitry Andric    HelpText<"Allow multiply defined symbols when creating executables">;
1790b57cec5SDimitry Andricdef force_multipleres : F<"force:multipleres">,
1800b57cec5SDimitry Andric    HelpText<"Allow multiply defined resources when creating executables">;
18181ad6265SDimitry Andricdefm WX : B<"WX", "Treat warnings as errors",
18281ad6265SDimitry Andric                  "Don't treat warnings as errors (default)">;
1830b57cec5SDimitry Andric
1840b57cec5SDimitry Andricdefm allowbind : B<"allowbind", "Enable DLL binding (default)",
1850b57cec5SDimitry Andric                   "Disable DLL binding">;
1860b57cec5SDimitry Andricdefm allowisolation : B<"allowisolation", "Enable DLL isolation (default)",
1870b57cec5SDimitry Andric                        "Disable DLL isolation">;
1880b57cec5SDimitry Andricdefm appcontainer : B<"appcontainer",
1890b57cec5SDimitry Andric                      "Image can only be run in an app container",
1900b57cec5SDimitry Andric                      "Image can run outside an app container (default)">;
1915ffd83dbSDimitry Andricdefm cetcompat : B<"cetcompat", "Mark executable image as compatible with Control-flow Enforcement Technology (CET) Shadow Stack",
1925ffd83dbSDimitry Andric                   "Don't mark executable image as compatible with Control-flow Enforcement Technology (CET) Shadow Stack (default)">;
1930b57cec5SDimitry Andricdefm dynamicbase : B<"dynamicbase", "Enable ASLR (default unless /fixed)",
1940b57cec5SDimitry Andric                     "Disable ASLR (default when /fixed)">;
1950b57cec5SDimitry Andricdefm fixed : B<"fixed", "Disable base relocations",
1960b57cec5SDimitry Andric               "Enable base relocations (default)">;
1970b57cec5SDimitry Andricdefm highentropyva : B<"highentropyva",
1980b57cec5SDimitry Andric                       "Enable 64-bit ASLR (default on 64-bit)",
1990b57cec5SDimitry Andric                       "Disable 64-bit ASLR">;
2000b57cec5SDimitry Andricdefm incremental : B<"incremental",
2010b57cec5SDimitry Andric                     "Keep original import library if contents are unchanged",
2020b57cec5SDimitry Andric                     "Overwrite import library even if contents are unchanged">;
203cbe9438cSDimitry Andricdefm inferasanlibs : B<"inferasanlibs",
204cbe9438cSDimitry Andric                       "Unused, generates a warning",
205cbe9438cSDimitry Andric                       "No effect (default)">;
2060b57cec5SDimitry Andricdefm integritycheck : B<"integritycheck",
2070b57cec5SDimitry Andric                        "Set FORCE_INTEGRITY bit in PE header",
2080b57cec5SDimitry Andric                        "No effect (default)">;
2090b57cec5SDimitry Andricdefm largeaddressaware : B<"largeaddressaware",
2100b57cec5SDimitry Andric                           "Enable large addresses (default on 64-bit)",
2110b57cec5SDimitry Andric                           "Disable large addresses (default on 32-bit)">;
2120b57cec5SDimitry Andricdefm nxcompat : B<"nxcompat", "Enable data execution prevention (default)",
2130b57cec5SDimitry Andric                  "Disable data execution provention">;
2140b57cec5SDimitry Andricdefm safeseh : B<"safeseh",
2150b57cec5SDimitry Andric                 "Produce an image with Safe Exception Handler (only for x86)",
2160b57cec5SDimitry Andric                 "Don't produce an image with Safe Exception Handler">;
2170b57cec5SDimitry Andricdefm tsaware  : B<"tsaware",
2180b57cec5SDimitry Andric                  "Create Terminal Server aware executable (default)",
2190b57cec5SDimitry Andric                  "Create non-Terminal Server aware executable">;
2200b57cec5SDimitry Andric
2210b57cec5SDimitry Andricdef help : F<"help">;
2220b57cec5SDimitry Andric
2230b57cec5SDimitry Andric// /?? and -?? must be before /? and -? to not confuse lib/Options.
2240b57cec5SDimitry Andricdef help_q : Flag<["/??", "-??", "/?", "-?"], "">, Alias<help>;
2250b57cec5SDimitry Andric
2260b57cec5SDimitry Andric// LLD extensions
2275ffd83dbSDimitry Andricdefm auto_import : B_priv<"auto-import">;
2285ffd83dbSDimitry Andricdefm runtime_pseudo_reloc : B_priv<"runtime-pseudo-reloc">;
22985868e8aSDimitry Andricdef end_lib : F<"end-lib">,
230e8d8bef9SDimitry Andric  HelpText<"End group of objects treated as if they were in a library">;
2310b57cec5SDimitry Andricdef exclude_all_symbols : F<"exclude-all-symbols">;
2320b57cec5SDimitry Andricdef export_all_symbols : F<"export-all-symbols">;
2330b57cec5SDimitry Andricdefm demangle : B<"demangle",
2340b57cec5SDimitry Andric    "Demangle symbols in output (default)",
2350b57cec5SDimitry Andric    "Do not demangle symbols in output">;
2360b57cec5SDimitry Andricdef include_optional : Joined<["/", "-", "/?", "-?"], "includeoptional:">,
2370b57cec5SDimitry Andric    HelpText<"Add symbol as undefined, but allow it to remain undefined">;
2380b57cec5SDimitry Andricdef kill_at : F<"kill-at">;
2395f757f3fSDimitry Andricdefm lld_allow_duplicate_weak : B_priv<"lld-allow-duplicate-weak">;
2405f757f3fSDimitry Andricdef lldemit : P<"lldemit", "Specify output type">;
2410b57cec5SDimitry Andricdef lldmingw : F<"lldmingw">;
242979e22ffSDimitry Andricdef noseh : F<"noseh">;
243e8d8bef9SDimitry Andricdef osversion : P_priv<"osversion">;
2440b57cec5SDimitry Andricdef output_def : Joined<["/", "-", "/?", "-?"], "output-def:">;
2450b57cec5SDimitry Andricdef pdb_source_path : P<"pdbsourcepath",
2460b57cec5SDimitry Andric    "Base path used to make relative source file path absolute in PDB">;
2470b57cec5SDimitry Andricdef rsp_quoting : Joined<["--"], "rsp-quoting=">,
2480b57cec5SDimitry Andric  HelpText<"Quoting style for response files, 'windows' (default) or 'posix'">;
24985868e8aSDimitry Andricdef start_lib : F<"start-lib">,
250e8d8bef9SDimitry Andric  HelpText<"Start group of objects treated as if they were in a library">;
251fe6060f1SDimitry Andricdefm stdcall_fixup : B_priv<"stdcall-fixup">;
2520b57cec5SDimitry Andricdef thinlto_emit_imports_files :
2530b57cec5SDimitry Andric    F<"thinlto-emit-imports-files">,
2540b57cec5SDimitry Andric    HelpText<"Emit .imports files with -thinlto-index-only">;
2550b57cec5SDimitry Andricdef thinlto_index_only :
2560b57cec5SDimitry Andric    F<"thinlto-index-only">,
2570b57cec5SDimitry Andric    HelpText<"Instead of linking, emit ThinLTO index files">;
2580b57cec5SDimitry Andricdef thinlto_index_only_arg : P<
2590b57cec5SDimitry Andric    "thinlto-index-only",
2600b57cec5SDimitry Andric    "-thinlto-index-only and also write native module names to file">;
2610b57cec5SDimitry Andricdef thinlto_object_suffix_replace : P<
2620b57cec5SDimitry Andric    "thinlto-object-suffix-replace",
2630b57cec5SDimitry Andric    "'old;new' replace old suffix with new suffix in ThinLTO index">;
2640b57cec5SDimitry Andricdef thinlto_prefix_replace: P<
2650b57cec5SDimitry Andric    "thinlto-prefix-replace",
2660b57cec5SDimitry Andric    "'old;new' replace old prefix with new prefix in ThinLTO outputs">;
26785868e8aSDimitry Andricdef lto_obj_path : P<
26885868e8aSDimitry Andric    "lto-obj-path",
26985868e8aSDimitry Andric    "output native object for merged LTO unit to this path">;
270fe6060f1SDimitry Andricdef lto_cs_profile_generate: F<"lto-cs-profile-generate">,
271fe6060f1SDimitry Andric    HelpText<"Perform context sensitive PGO instrumentation">;
272fe6060f1SDimitry Andricdef lto_cs_profile_file : P<"lto-cs-profile-file",
273fe6060f1SDimitry Andric    "Context sensitive profile file path">;
274349cc55cSDimitry Andricdefm lto_pgo_warn_mismatch: B<
275349cc55cSDimitry Andric     "lto-pgo-warn-mismatch",
276349cc55cSDimitry Andric     "turn on warnings about profile cfg mismatch (default)>",
277349cc55cSDimitry Andric     "turn off warnings about profile cfg mismatch">;
2780b57cec5SDimitry Andricdef dash_dash_version : Flag<["--"], "version">,
279e8d8bef9SDimitry Andric  HelpText<"Display the version number and exit">;
2805ffd83dbSDimitry Andricdef threads
2815ffd83dbSDimitry Andric    : P<"threads", "Number of threads. '1' disables multi-threading. By "
2825ffd83dbSDimitry Andric                   "default all available hardware threads are used">;
283e8d8bef9SDimitry Andricdef call_graph_ordering_file: P<
284e8d8bef9SDimitry Andric    "call-graph-ordering-file",
285e8d8bef9SDimitry Andric    "Layout sections to optimize the given callgraph">;
286e8d8bef9SDimitry Andricdefm call_graph_profile_sort: B<
287e8d8bef9SDimitry Andric    "call-graph-profile-sort",
288e8d8bef9SDimitry Andric    "Reorder sections with call graph profile (default)",
289e8d8bef9SDimitry Andric    "Do not reorder sections with call graph profile">;
290e8d8bef9SDimitry Andricdef print_symbol_order: P<
291e8d8bef9SDimitry Andric    "print-symbol-order",
292e8d8bef9SDimitry Andric    "Print a symbol order specified by /call-graph-ordering-file and "
293e8d8bef9SDimitry Andric    "/call-graph-profile-sort into the specified file">;
294e8d8bef9SDimitry Andricdef wrap : P_priv<"wrap">;
2950b57cec5SDimitry Andric
296753f127fSDimitry Andricdef vfsoverlay : P<"vfsoverlay", "Path to a vfsoverlay yaml file to optionally look for /defaultlib's in">;
297753f127fSDimitry Andric
2985f757f3fSDimitry Andricdef time_trace_eq: Joined<["--"], "time-trace=">, MetaVarName<"<file>">,
2995f757f3fSDimitry Andric  HelpText<"Record time trace to <file>">;
3005f757f3fSDimitry Andricdef : Flag<["--"], "time-trace">, Alias<time_trace_eq>,
3015f757f3fSDimitry Andric  HelpText<"Record time trace to file next to output">;
3025f757f3fSDimitry Andric
3035f757f3fSDimitry Andricdef time_trace_granularity_eq: Joined<["--"], "time-trace-granularity=">,
3045f757f3fSDimitry Andric    HelpText<"Minimum time granularity (in microseconds) traced by time profiler">;
3055f757f3fSDimitry Andric
3065f757f3fSDimitry Andricdefm build_id: B<
3075f757f3fSDimitry Andric     "build-id",
3085f757f3fSDimitry Andric     "Generate build ID (always on when generating PDB)",
3095f757f3fSDimitry Andric     "Do not Generate build ID">;
3105f757f3fSDimitry Andric
3110b57cec5SDimitry Andric// Flags for debugging
3120b57cec5SDimitry Andricdef lldmap : F<"lldmap">;
313349cc55cSDimitry Andricdef lldmap_file : P_priv<"lldmap">;
3145ffd83dbSDimitry Andricdef map : F<"map">;
315349cc55cSDimitry Andricdef map_file : P_priv<"map">;
316bdd1243dSDimitry Andricdef map_info : P<"mapinfo", "Include the specified information in a map file">;
31706c3fb27SDimitry Andricdef print_search_paths : F<"print-search-paths">;
3180b57cec5SDimitry Andricdef show_timing : F<"time">;
3190b57cec5SDimitry Andricdef summary : F<"summary">;
3200b57cec5SDimitry Andric
3210b57cec5SDimitry Andric//==============================================================================
3220b57cec5SDimitry Andric// The flags below do nothing. They are defined only for link.exe compatibility.
3230b57cec5SDimitry Andric//==============================================================================
3240b57cec5SDimitry Andric
3250b57cec5SDimitry Andricdef ignoreidl : F<"ignoreidl">;
326349cc55cSDimitry Andricdef ltcg : F<"ltcg">;
327bdd1243dSDimitry Andricdef assemblydebug : F<"assemblydebug">;
3280b57cec5SDimitry Andricdef nologo : F<"nologo">;
3290b57cec5SDimitry Andricdef throwingnew : F<"throwingnew">;
3300b57cec5SDimitry Andricdef editandcontinue : F<"editandcontinue">;
3310b57cec5SDimitry Andricdef fastfail : F<"fastfail">;
33281ad6265SDimitry Andricdef kernel : F<"kernel">;
33381ad6265SDimitry Andricdef pdbcompress : F<"pdbcompress">;
334bdd1243dSDimitry Andricdef emitpogophaseinfo : F<"emitpogophaseinfo">;
3350b57cec5SDimitry Andric
336349cc55cSDimitry Andricdef delay : P_priv<"delay">;
337349cc55cSDimitry Andricdef errorreport : P_priv<"errorreport">;
338349cc55cSDimitry Andricdef idlout : P_priv<"idlout">;
339349cc55cSDimitry Andricdef ilk : P_priv<"ilk">;
340349cc55cSDimitry Andricdef ltcg_opt : P_priv<"ltcg">;
341bdd1243dSDimitry Andricdef assemblydebug_opt : P_priv<"assemblydebug">;
342349cc55cSDimitry Andricdef ltcgout : P_priv<"ltcgout">;
343349cc55cSDimitry Andricdef maxilksize : P_priv<"maxilksize">;
344349cc55cSDimitry Andricdef tlbid : P_priv<"tlbid">;
345349cc55cSDimitry Andricdef tlbout : P_priv<"tlbout">;
346349cc55cSDimitry Andricdef verbose_all : P_priv<"verbose">;
347349cc55cSDimitry Andricdef guardsym : P_priv<"guardsym">;
348