Martell Malone | 894dbbe | 2017-09-11 17:02:59 | [diff] [blame] | 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 | def L: JoinedOrSeparate<["-"], "L">, MetaVarName<"<dir>">, |
| 8 | HelpText<"Add a directory to the library search path">; |
| 9 | def entry: S<"entry">, MetaVarName<"<entry>">, |
| 10 | HelpText<"Name of entry point symbol">; |
Rui Ueyama | c3e4602 | 2017-09-11 20:54:51 | [diff] [blame] | 11 | def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"<libName>">, |
| 12 | HelpText<"Root name of library to use">; |
Martell Malone | 894dbbe | 2017-09-11 17:02:59 | [diff] [blame] | 13 | def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">; |
Martell Malone | 0d17638 | 2017-09-11 21:36:37 | [diff] [blame] | 14 | def mllvm: S<"mllvm">; |
Martin Storsjo | 32e1626 | 2017-09-13 07:28:09 | [diff] [blame^] | 15 | def no_whole_archive: F<"no-whole-archive">, |
| 16 | HelpText<"No longer include all object files for following archives">; |
Martell Malone | 894dbbe | 2017-09-11 17:02:59 | [diff] [blame] | 17 | def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">, |
| 18 | HelpText<"Path to file to write output">; |
Rui Ueyama | c3e4602 | 2017-09-11 20:54:51 | [diff] [blame] | 19 | def out_implib: Separate<["--"], "out-implib">, HelpText<"Import library name">; |
Martell Malone | 894dbbe | 2017-09-11 17:02:59 | [diff] [blame] | 20 | def shared: F<"shared">, HelpText<"Build a shared object">; |
| 21 | def subs: Separate<["--"], "subsystem">, HelpText<"Specify subsystem">; |
| 22 | def stack: Separate<["--"], "stack">; |
Martin Storsjo | 32e1626 | 2017-09-13 07:28:09 | [diff] [blame^] | 23 | def whole_archive: F<"whole-archive">, |
| 24 | HelpText<"Include all object files for following archives">; |
Martin Storsjo | a79762a | 2017-09-11 20:43:39 | [diff] [blame] | 25 | def verbose: F<"verbose">, HelpText<"Verbose mode">; |
| 26 | |
| 27 | // LLD specific options |
| 28 | def _HASH_HASH_HASH : Flag<["-"], "###">, |
| 29 | HelpText<"Print (but do not run) the commands to run for this compilation">; |
Martell Malone | 894dbbe | 2017-09-11 17:02:59 | [diff] [blame] | 30 | |
| 31 | // Currently stubs to avoid errors |
| 32 | def Bdynamic: F<"Bdynamic">, HelpText<"Link against shared libraries">; |
| 33 | def Bstatic: F<"Bstatic">, HelpText<"Do not link against shared libraries">; |
Rui Ueyama | c3e4602 | 2017-09-11 20:54:51 | [diff] [blame] | 34 | def O: Joined<["-"], "O">, HelpText<"Optimize output file size">; |
Martell Malone | 894dbbe | 2017-09-11 17:02:59 | [diff] [blame] | 35 | def enable_auto_image_base: Flag<["--"], "enable-auto-image-base">; |
| 36 | def full_shutdown: Flag<["--"], "full-shutdown">; |
Rui Ueyama | c3e4602 | 2017-09-11 20:54:51 | [diff] [blame] | 37 | def major_image_version: Separate<["--"], "major-image-version">; |
| 38 | def minor_image_version: Separate<["--"], "minor-image-version">; |
Martin Storsjo | 5d5aa21 | 2017-09-11 20:43:43 | [diff] [blame] | 39 | def sysroot: J<"sysroot">, HelpText<"Sysroot">; |
Martell Malone | 894dbbe | 2017-09-11 17:02:59 | [diff] [blame] | 40 | def v: Flag<["-"], "v">, HelpText<"Display the version number">; |
Martell Malone | 894dbbe | 2017-09-11 17:02:59 | [diff] [blame] | 41 | def version: F<"version">, HelpText<"Display the version number and exit">; |
| 42 | |
| 43 | // Alias |
| 44 | def alias_entry_e: JoinedOrSeparate<["-"], "e">, Alias<entry>; |