]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lld/COFF/Options.td
Merge lld trunk r300422 and resolve conflicts.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lld / COFF / Options.td
1 include "llvm/Option/OptParser.td"
2
3 // link.exe accepts options starting with either a dash or a slash.
4
5 // Flag that takes no arguments.
6 class F<string name> : Flag<["/", "-", "-?"], name>;
7
8 // Flag that takes one argument after ":".
9 class P<string name, string help> :
10       Joined<["/", "-", "-?"], name#":">, HelpText<help>;
11
12 // Boolean flag suffixed by ":no".
13 multiclass B<string name, string help> {
14   def "" : F<name>;
15   def _no : F<name#":no">, HelpText<help>;
16 }
17
18 def align   : P<"align", "Section alignment">;
19 def alternatename : P<"alternatename", "Define weak alias">;
20 def base    : P<"base", "Base address of the program">;
21 def defaultlib : P<"defaultlib", "Add the library to the list of input files">;
22 def delayload : P<"delayload", "Delay loaded DLL name">;
23 def entry   : P<"entry", "Name of entry point symbol">;
24 def errorlimit : P<"errorlimit",
25     "Maximum number of errors to emit before stopping (0 = no limit)">;
26 def export  : P<"export", "Export a function">;
27 // No help text because /failifmismatch is not intended to be used by the user.
28 def failifmismatch : P<"failifmismatch", "">;
29 def heap    : P<"heap", "Size of the heap">;
30 def implib  : P<"implib", "Import library name">;
31 def libpath : P<"libpath", "Additional library search path">;
32 def linkrepro : P<"linkrepro", "Dump linker invocation and input files for debugging">;
33 def lldsavetemps : F<"lldsavetemps">,
34     HelpText<"Save temporary files instead of deleting them">;
35 def machine : P<"machine", "Specify target platform">;
36 def merge   : P<"merge", "Combine sections">;
37 def mllvm   : P<"mllvm", "Options to pass to LLVM">;
38 def nodefaultlib : P<"nodefaultlib", "Remove a default library">;
39 def opt     : P<"opt", "Control optimizations">;
40 def out     : P<"out", "Path to file to write output">;
41 def pdb : P<"pdb", "PDB file path">;
42 def section : P<"section", "Specify section attributes">;
43 def stack   : P<"stack", "Size of the stack">;
44 def stub    : P<"stub", "Specify DOS stub file">;
45 def subsystem : P<"subsystem", "Specify subsystem">;
46 def version : P<"version", "Specify a version number in the PE header">;
47
48 def disallowlib : Joined<["/", "-", "-?"], "disallowlib:">, Alias<nodefaultlib>;
49
50 def manifest : F<"manifest">;
51 def manifest_colon : P<"manifest", "Create manifest file">;
52 def manifestuac : P<"manifestuac", "User access control">;
53 def manifestfile : P<"manifestfile", "Manifest file path">;
54 def manifestdependency : P<"manifestdependency",
55                            "Attributes for <dependency> in manifest file">;
56 def manifestinput : P<"manifestinput", "Specify manifest file">;
57
58 // We cannot use multiclass P because class name "incl" is different
59 // from its command line option name. We do this because "include" is
60 // a reserved keyword in tablegen.
61 def incl : Joined<["/", "-"], "include:">,
62     HelpText<"Force symbol to be added to symbol table as undefined one">;
63
64 // "def" is also a keyword.
65 def deffile : Joined<["/", "-"], "def:">,
66     HelpText<"Use module-definition file">;
67
68 def debug : F<"debug">, HelpText<"Embed a symbol table in the image">;
69 def debugtype : P<"debugtype", "Debug Info Options">;
70 def dll : F<"dll">, HelpText<"Create a DLL">;
71 def driver : P<"driver", "Generate a Windows NT Kernel Mode Driver">;
72 def nodefaultlib_all : F<"nodefaultlib">;
73 def noentry : F<"noentry">;
74 def profile : F<"profile">;
75 def swaprun_cd : F<"swaprun:cd">;
76 def swaprun_net : F<"swaprun:net">;
77 def verbose : F<"verbose">;
78
79 def force : F<"force">,
80     HelpText<"Allow undefined symbols when creating executables">;
81 def force_unresolved : F<"force:unresolved">;
82
83 defm allowbind: B<"allowbind", "Disable DLL binding">;
84 defm allowisolation : B<"allowisolation", "Set NO_ISOLATION bit">;
85 defm appcontainer : B<"appcontainer",
86                       "Image can only be run in an app container">;
87 defm dynamicbase : B<"dynamicbase",
88                      "Disable address space layout randomization">;
89 defm fixed    : B<"fixed", "Enable base relocations">;
90 defm highentropyva : B<"highentropyva", "Set HIGH_ENTROPY_VA bit">;
91 defm largeaddressaware : B<"largeaddressaware", "Disable large addresses">;
92 defm nxcompat : B<"nxcompat", "Disable data execution provention">;
93 defm safeseh : B<"safeseh", "Produce an image with Safe Exception Handler">;
94 defm tsaware  : B<"tsaware", "Create non-Terminal Server aware executable">;
95
96 def help : F<"help">;
97 def help_q : Flag<["/?", "-?"], "">, Alias<help>;
98
99 // LLD extensions
100 def nopdb : F<"nopdb">, HelpText<"Disable PDB generation for DWARF users">;
101 def nosymtab : F<"nosymtab">;
102 def msvclto : F<"msvclto">;
103
104 // Flags for debugging
105 def debugpdb : F<"debugpdb">;
106 def dumppdb : Joined<["/", "-"], "dumppdb">;
107 def lldmap : F<"lldmap">;
108 def lldmap_file : Joined<["/", "-"], "lldmap:">;
109
110 //==============================================================================
111 // The flags below do nothing. They are defined only for link.exe compatibility.
112 //==============================================================================
113
114 class QF<string name> : Joined<["/", "-", "-?"], name#":">;
115
116 multiclass QB<string name> {
117   def "" : F<name>;
118   def _no : F<name#":no">;
119 }
120
121 def functionpadmin : F<"functionpadmin">;
122 def ignoreidl : F<"ignoreidl">;
123 def incremental : F<"incremental">;
124 def no_incremental : F<"incremental:no">;
125 def nologo : F<"nologo">;
126 def throwingnew : F<"throwingnew">;
127 def editandcontinue : F<"editandcontinue">;
128 def fastfail : F<"fastfail">;
129
130 def delay : QF<"delay">;
131 def errorreport : QF<"errorreport">;
132 def idlout : QF<"idlout">;
133 def ignore : QF<"ignore">;
134 def maxilksize : QF<"maxilksize">;
135 def pdbaltpath : QF<"pdbaltpath">;
136 def tlbid : QF<"tlbid">;
137 def tlbout : QF<"tlbout">;
138 def verbose_all : QF<"verbose">;
139 def guardsym : QF<"guardsym">;
140
141 defm wx : QB<"wx">;