Marek Sokolowski | 2ce2fa4 | 2017-07-25 00:25:18 +0000 | [diff] [blame] | 1 | include "llvm/Option/OptParser.td" |
| 2 | |
| 3 | // All the switches can be preceded by either '/' or '-'. |
| 4 | // These options seem to be important for the tool |
| 5 | // and should be implemented. |
| 6 | |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 7 | def fileout : JoinedOrSeparate<[ "/", "-" ], "FO">, |
Marek Sokolowski | 2ce2fa4 | 2017-07-25 00:25:18 +0000 | [diff] [blame] | 8 | HelpText<"Change the output file location.">; |
| 9 | |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 10 | def define : Separate<[ "/", "-" ], "D">, |
Marek Sokolowski | 2ce2fa4 | 2017-07-25 00:25:18 +0000 | [diff] [blame] | 11 | HelpText<"Define a symbol for the C preprocessor.">; |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 12 | def undef : Separate<[ "/", "-" ], "U">, |
Marek Sokolowski | 2ce2fa4 | 2017-07-25 00:25:18 +0000 | [diff] [blame] | 13 | HelpText<"Undefine a symbol for the C preprocessor.">; |
| 14 | |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 15 | def lang_id : JoinedOrSeparate<[ "/", "-" ], "L">, |
Marek Sokolowski | 2ce2fa4 | 2017-07-25 00:25:18 +0000 | [diff] [blame] | 16 | HelpText<"Set the default language identifier.">; |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 17 | def lang_name : Separate<[ "/", "-" ], "LN">, |
Marek Sokolowski | 2ce2fa4 | 2017-07-25 00:25:18 +0000 | [diff] [blame] | 18 | HelpText<"Set the default language name.">; |
| 19 | |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 20 | def includepath : Separate<[ "/", "-" ], "I">, HelpText<"Add an include path.">; |
| 21 | def noinclude : Flag<[ "/", "-" ], "X">, HelpText<"Ignore 'include' variable.">; |
Marek Sokolowski | 2ce2fa4 | 2017-07-25 00:25:18 +0000 | [diff] [blame] | 22 | |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 23 | def add_null : Flag<[ "/", "-" ], "N">, |
Marek Sokolowski | 2ce2fa4 | 2017-07-25 00:25:18 +0000 | [diff] [blame] | 24 | HelpText<"Null-terminate all strings in the string table.">; |
| 25 | |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 26 | def dupid_nowarn : Flag<[ "/", "-" ], "Y">, |
Marek Sokolowski | 2ce2fa4 | 2017-07-25 00:25:18 +0000 | [diff] [blame] | 27 | HelpText<"Suppress warnings on duplicate resource IDs.">; |
| 28 | |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 29 | def verbose : Flag<[ "/", "-" ], "V">, HelpText<"Be verbose.">; |
| 30 | def help : Flag<[ "/", "-" ], "?">, HelpText<"Display this help and exit.">; |
| 31 | def h : Flag<[ "/", "-" ], "H">, |
| 32 | Alias<help>, |
Marek Sokolowski | 2ce2fa4 | 2017-07-25 00:25:18 +0000 | [diff] [blame] | 33 | HelpText<"Display this help and exit.">; |
| 34 | |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 35 | def dry_run : Flag<[ "/", "-" ], "dry-run">, |
Marek Sokolowski | 8f19343 | 2017-09-29 17:14:09 +0000 | [diff] [blame] | 36 | HelpText<"Don't compile the input; only try to parse it.">; |
| 37 | |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 38 | def codepage : JoinedOrSeparate<[ "/", "-" ], "C">, |
Martin Storsjo | d1d046a | 2018-05-02 19:43:44 +0000 | [diff] [blame] | 39 | HelpText<"Set the codepage used for input strings.">; |
| 40 | |
Marek Sokolowski | 2ce2fa4 | 2017-07-25 00:25:18 +0000 | [diff] [blame] | 41 | // Unused switches (at least for now). These will stay unimplemented |
| 42 | // in an early stage of development and can be ignored. However, we need to |
| 43 | // parse them in order to preserve the compatibility with the original tool. |
| 44 | |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 45 | def nologo : Flag<[ "/", "-" ], "NOLOGO">; |
| 46 | def r : Flag<[ "/", "-" ], "R">; |
| 47 | def sl : Flag<[ "/", "-" ], "SL">; |
Marek Sokolowski | 2ce2fa4 | 2017-07-25 00:25:18 +0000 | [diff] [blame] | 48 | |
| 49 | // (Codepages support.) |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 50 | def w : Flag<[ "/", "-" ], "W">; |
Marek Sokolowski | 2ce2fa4 | 2017-07-25 00:25:18 +0000 | [diff] [blame] | 51 | |
| 52 | // (Support of MUI and similar.) |
Martin Storsjö | c913f6d | 2020-08-05 11:00:21 +0300 | [diff] [blame] | 53 | def fm : Separate<[ "/", "-" ], "FM">; |
| 54 | def q : Separate<[ "/", "-" ], "Q">; |
| 55 | def g : Flag<[ "/", "-" ], "G">; |
| 56 | def gn : Flag<[ "/", "-" ], "GN">; |
| 57 | def g1 : Flag<[ "/", "-" ], "G1">; |
| 58 | def g2 : Flag<[ "/", "-" ], "G2">; |