blob: de3ac367d26753aa59135ffce800934c9a9e14c1 [file] [log] [blame]
Martell Malone894dbbe2017-09-11 17:02:591include "llvm/Option/OptParser.td"
2
3class F<string name>: Flag<["--", "-"], name>;
4class J<string name>: Joined<["--", "-"], name>;
5class S<string name>: Separate<["--", "-"], name>;
6
7def L: JoinedOrSeparate<["-"], "L">, MetaVarName<"<dir>">,
8 HelpText<"Add a directory to the library search path">;
Martin Storsjod79a4b72019-01-29 19:24:329def Bdynamic: F<"Bdynamic">, HelpText<"Link against shared libraries">;
10def Bstatic: F<"Bstatic">, HelpText<"Do not link against shared libraries">;
Martin Storsjo094d8c02017-11-15 08:18:1111def dynamicbase: F<"dynamicbase">, HelpText<"Enable ASLR">;
Martell Malone894dbbe2017-09-11 17:02:5912def entry: S<"entry">, MetaVarName<"<entry>">,
13 HelpText<"Name of entry point symbol">;
Martin Storsjo97058982019-02-19 21:57:4914def exclude_all_symbols: F<"exclude-all-symbols">,
15 HelpText<"Don't automatically export any symbols">;
Martin Storsjoa84a4772017-10-12 05:37:1816def export_all_symbols: F<"export-all-symbols">,
17 HelpText<"Export all symbols even if a def file or dllexport attributes are used">;
Martin Storsjob190fd22017-11-15 08:18:2018def gc_sections: F<"gc-sections">, HelpText<"Remove unused sections">;
Martin Storsjo9ae0d222019-05-17 11:07:3819def help: F<"help">, HelpText<"Print option help">;
Martin Storsjob190fd22017-11-15 08:18:2020def icf: J<"icf=">, HelpText<"Identical code folding">;
Martin Storsjoe9168682017-11-15 08:18:1521def image_base: S<"image-base">, HelpText<"Base address of the program">;
Martin Storsjodfb2fcd2019-02-06 21:05:2922def insert_timestamp: F<"insert-timestamp">,
23 HelpText<"Include PE header timestamp">;
Martin Storsjofb36e6e2018-03-14 20:17:2424def kill_at: F<"kill-at">, HelpText<"Remove @n from exported symbols">;
Rui Ueyamac3e46022017-09-11 20:54:5125def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"<libName>">,
26 HelpText<"Root name of library to use">;
Martell Malone894dbbe2017-09-11 17:02:5927def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">;
Martin Storsjo03661552018-05-15 21:12:2928def map: S<"Map">, HelpText<"Output a linker map">;
29def map_eq: J<"Map=">, Alias<map>;
Martin Storsjo537a7182019-02-05 08:16:0630def no_insert_timestamp: F<"no-insert-timestamp">,
31 HelpText<"Don't include PE header timestamp">;
Martin Storsjo32e16262017-09-13 07:28:0932def no_whole_archive: F<"no-whole-archive">,
33 HelpText<"No longer include all object files for following archives">;
Martin Storsjo3c8d4b52017-11-15 08:18:0634def large_address_aware: Flag<["--"], "large-address-aware">,
35 HelpText<"Enable large addresses">;
Martin Storsjob190fd22017-11-15 08:18:2036def no_gc_sections: F<"no-gc-sections">, HelpText<"Don't remove unused sections">;
Martell Malone894dbbe2017-09-11 17:02:5937def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">,
38 HelpText<"Path to file to write output">;
Rui Ueyamac3e46022017-09-11 20:54:5139def out_implib: Separate<["--"], "out-implib">, HelpText<"Import library name">;
Martin Storsjo27af6b02017-10-26 20:11:5840def out_implib_eq: Joined<["--"], "out-implib=">, Alias<out_implib>;
Martin Storsjoa84a4772017-10-12 05:37:1841def output_def: S<"output-def">, HelpText<"Output def file">;
Martell Malone894dbbe2017-09-11 17:02:5942def shared: F<"shared">, HelpText<"Build a shared object">;
Rui Ueyama1f4cdcf2017-09-14 18:33:2143def subs: S<"subsystem">, HelpText<"Specify subsystem">;
44def stack: S<"stack">;
Martin Storsjo068512d2017-11-03 22:10:3745def strip_all: F<"strip-all">,
46 HelpText<"Omit all symbol information from the output binary">;
Martin Storsjoc0826742018-06-29 06:08:3147def strip_debug: F<"strip-debug">,
48 HelpText<"Omit all debug information, but keep symbol information">;
Martin Storsjo32e16262017-09-13 07:28:0949def whole_archive: F<"whole-archive">,
50 HelpText<"Include all object files for following archives">;
Martin Storsjo6863dfa2019-05-17 11:07:4251def v: Flag<["-"], "v">, HelpText<"Display the version number">;
Martin Storsjoa79762a2017-09-11 20:43:3952def verbose: F<"verbose">, HelpText<"Verbose mode">;
Martin Storsjo6863dfa2019-05-17 11:07:4253def version: F<"version">, HelpText<"Display the version number and exit">;
Martin Storsjodb629132018-09-10 17:41:4054def require_defined: S<"require-defined">,
55 HelpText<"Force symbol to be added to symbol table as an undefined one">;
56def require_defined_eq: J<"require-defined=">, Alias<require_defined>;
Martin Storsjoa79762a2017-09-11 20:43:3957
58// LLD specific options
59def _HASH_HASH_HASH : Flag<["-"], "###">,
60 HelpText<"Print (but do not run) the commands to run for this compilation">;
Martin Storsjo2c1f3ea2019-04-19 13:50:4361def appcontainer: F<"appcontainer">, HelpText<"Set the appcontainer flag in the executable">;
Martin Storsjo107b5482017-11-03 07:18:3762def mllvm: S<"mllvm">;
Martin Storsjo2c52ddf2019-05-17 11:07:3363def pdb: S<"pdb">, HelpText<"Specify output PDB debug information file. "
64 "Defaults to the output filename, with a pdb suffix, if given an empty argument">;
65def pdb_eq: J<"pdb=">, Alias<pdb>;
Martin Storsjo107b5482017-11-03 07:18:3766def Xlink : J<"Xlink=">, MetaVarName<"<arg>">,
67 HelpText<"Pass <arg> to the COFF linker">;
Martell Malone894dbbe2017-09-11 17:02:5968
Martell Malone894dbbe2017-09-11 17:02:5969// Alias
70def alias_entry_e: JoinedOrSeparate<["-"], "e">, Alias<entry>;
Martin Storsjo068512d2017-11-03 22:10:3771def alias_strip_s: Flag<["-"], "s">, Alias<strip_all>;
Martin Storsjoc0826742018-06-29 06:08:3172def alias_strip_S: Flag<["-"], "S">, Alias<strip_debug>;
Martin Storsjo5d1862b2019-01-29 08:38:4873
74// Ignored options
Martin Storsjod79a4b72019-01-29 19:24:3275def: Joined<["-"], "O">;
76def: F<"build-id">;
77def: F<"disable-auto-image-base">;
78def: F<"enable-auto-image-base">;
Martin Storsjo6ff6a8f2019-05-17 11:07:4679def: F<"enable-auto-import">, HelpText<"Ignored; listed for libtool compatibility">;
Martin Storsjod79a4b72019-01-29 19:24:3280def: F<"end-group">;
81def: Flag<["--"], "full-shutdown">;
82def: F<"high-entropy-va">;
83def: S<"major-image-version">;
84def: S<"minor-image-version">;
85def: F<"no-seh">;
86def: F<"nxcompat">;
87def: F<"pic-executable">;
Martin Storsjo5d1862b2019-01-29 08:38:4888def: S<"plugin">;
89def: J<"plugin=">;
90def: S<"plugin-opt">;
91def: J<"plugin-opt=">;
Martin Storsjod79a4b72019-01-29 19:24:3292def: J<"sysroot">;
93def: F<"start-group">;
94def: F<"tsaware">;