blob: 67698056bbf7486b38e77368cdb7cd11331e8d97 [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">;
19def icf: J<"icf=">, HelpText<"Identical code folding">;
Martin Storsjoe9168682017-11-15 08:18:1520def image_base: S<"image-base">, HelpText<"Base address of the program">;
Martin Storsjodfb2fcd2019-02-06 21:05:2921def insert_timestamp: F<"insert-timestamp">,
22 HelpText<"Include PE header timestamp">;
Martin Storsjofb36e6e2018-03-14 20:17:2423def kill_at: F<"kill-at">, HelpText<"Remove @n from exported symbols">;
Rui Ueyamac3e46022017-09-11 20:54:5124def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"<libName>">,
25 HelpText<"Root name of library to use">;
Martell Malone894dbbe2017-09-11 17:02:5926def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">;
Martin Storsjo03661552018-05-15 21:12:2927def map: S<"Map">, HelpText<"Output a linker map">;
28def map_eq: J<"Map=">, Alias<map>;
Martin Storsjo537a7182019-02-05 08:16:0629def no_insert_timestamp: F<"no-insert-timestamp">,
30 HelpText<"Don't include PE header timestamp">;
Martin Storsjo32e16262017-09-13 07:28:0931def no_whole_archive: F<"no-whole-archive">,
32 HelpText<"No longer include all object files for following archives">;
Martin Storsjo3c8d4b52017-11-15 08:18:0633def large_address_aware: Flag<["--"], "large-address-aware">,
34 HelpText<"Enable large addresses">;
Martin Storsjob190fd22017-11-15 08:18:2035def no_gc_sections: F<"no-gc-sections">, HelpText<"Don't remove unused sections">;
Martell Malone894dbbe2017-09-11 17:02:5936def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">,
37 HelpText<"Path to file to write output">;
Rui Ueyamac3e46022017-09-11 20:54:5138def out_implib: Separate<["--"], "out-implib">, HelpText<"Import library name">;
Martin Storsjo27af6b02017-10-26 20:11:5839def out_implib_eq: Joined<["--"], "out-implib=">, Alias<out_implib>;
Martin Storsjoa84a4772017-10-12 05:37:1840def output_def: S<"output-def">, HelpText<"Output def file">;
Martell Malone894dbbe2017-09-11 17:02:5941def shared: F<"shared">, HelpText<"Build a shared object">;
Rui Ueyama1f4cdcf2017-09-14 18:33:2142def subs: S<"subsystem">, HelpText<"Specify subsystem">;
43def stack: S<"stack">;
Martin Storsjo068512d2017-11-03 22:10:3744def strip_all: F<"strip-all">,
45 HelpText<"Omit all symbol information from the output binary">;
Martin Storsjoc0826742018-06-29 06:08:3146def strip_debug: F<"strip-debug">,
47 HelpText<"Omit all debug information, but keep symbol information">;
Martin Storsjo32e16262017-09-13 07:28:0948def whole_archive: F<"whole-archive">,
49 HelpText<"Include all object files for following archives">;
Martin Storsjoa79762a2017-09-11 20:43:3950def verbose: F<"verbose">, HelpText<"Verbose mode">;
Martin Storsjodb629132018-09-10 17:41:4051def require_defined: S<"require-defined">,
52 HelpText<"Force symbol to be added to symbol table as an undefined one">;
53def require_defined_eq: J<"require-defined=">, Alias<require_defined>;
Martin Storsjoa79762a2017-09-11 20:43:3954
55// LLD specific options
56def _HASH_HASH_HASH : Flag<["-"], "###">,
57 HelpText<"Print (but do not run) the commands to run for this compilation">;
Martin Storsjo107b5482017-11-03 07:18:3758def mllvm: S<"mllvm">;
Martin Storsjob7d50112018-05-15 06:34:1859def pdb: S<"pdb">, HelpText<"Specify output PDB debug information file">;
Martin Storsjo107b5482017-11-03 07:18:3760def Xlink : J<"Xlink=">, MetaVarName<"<arg>">,
61 HelpText<"Pass <arg> to the COFF linker">;
Martell Malone894dbbe2017-09-11 17:02:5962
Martell Malone894dbbe2017-09-11 17:02:5963// Alias
64def alias_entry_e: JoinedOrSeparate<["-"], "e">, Alias<entry>;
Martin Storsjo068512d2017-11-03 22:10:3765def alias_strip_s: Flag<["-"], "s">, Alias<strip_all>;
Martin Storsjoc0826742018-06-29 06:08:3166def alias_strip_S: Flag<["-"], "S">, Alias<strip_debug>;
Martin Storsjo5d1862b2019-01-29 08:38:4867
68// Ignored options
Martin Storsjod79a4b72019-01-29 19:24:3269def: Joined<["-"], "O">;
70def: F<"build-id">;
71def: F<"disable-auto-image-base">;
72def: F<"enable-auto-image-base">;
73def: F<"enable-auto-import">;
74def: F<"end-group">;
75def: Flag<["--"], "full-shutdown">;
76def: F<"high-entropy-va">;
77def: S<"major-image-version">;
78def: S<"minor-image-version">;
79def: F<"no-seh">;
80def: F<"nxcompat">;
81def: F<"pic-executable">;
Martin Storsjo5d1862b2019-01-29 08:38:4882def: S<"plugin">;
83def: J<"plugin=">;
84def: S<"plugin-opt">;
85def: J<"plugin-opt=">;
Martin Storsjod79a4b72019-01-29 19:24:3286def: J<"sysroot">;
87def: F<"start-group">;
88def: F<"tsaware">;
89def: Flag<["-"], "v">;
90def: F<"version">;