]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lld/COFF/Options.td
Update lld to trunk r290819 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 export  : P<"export", "Export a function">;
25 // No help text because /failifmismatch is not intended to be used by the user.
26 def failifmismatch : P<"failifmismatch", "">;
27 def heap    : P<"heap", "Size of the heap">;
28 def implib  : P<"implib", "Import library name">;
29 def libpath : P<"libpath", "Additional library search path">;
30 def linkrepro : P<"linkrepro", "Dump linker invocation and input files for debugging">;
31 def machine : P<"machine", "Specify target platform">;
32 def merge   : P<"merge", "Combine sections">;
33 def mllvm   : P<"mllvm", "Options to pass to LLVM">;
34 def nodefaultlib : P<"nodefaultlib", "Remove a default library">;
35 def opt     : P<"opt", "Control optimizations">;
36 def out     : P<"out", "Path to file to write output">;
37 def pdb : P<"pdb", "PDB file path">;
38 def section : P<"section", "Specify section attributes">;
39 def stack   : P<"stack", "Size of the stack">;
40 def stub    : P<"stub", "Specify DOS stub file">;
41 def subsystem : P<"subsystem", "Specify subsystem">;
42 def version : P<"version", "Specify a version number in the PE header">;
43
44 def disallowlib : Joined<["/", "-", "-?"], "disallowlib:">, Alias<nodefaultlib>;
45
46 def manifest : F<"manifest">;
47 def manifest_colon : P<"manifest", "Create manifest file">;
48 def manifestuac : P<"manifestuac", "User access control">;
49 def manifestfile : P<"manifestfile", "Manifest file path">;
50 def manifestdependency : P<"manifestdependency",
51                            "Attributes for <dependency> in manifest file">;
52 def manifestinput : P<"manifestinput", "Specify manifest file">;
53
54 // We cannot use multiclass P because class name "incl" is different
55 // from its command line option name. We do this because "include" is
56 // a reserved keyword in tablegen.
57 def incl : Joined<["/", "-"], "include:">,
58     HelpText<"Force symbol to be added to symbol table as undefined one">;
59
60 // "def" is also a keyword.
61 def deffile : Joined<["/", "-"], "def:">,
62     HelpText<"Use module-definition file">;
63
64 def debug : F<"debug">, HelpText<"Embed a symbol table in the image">;
65 def debugtype : P<"debugtype", "Debug Info Options">;
66 def dll : F<"dll">, HelpText<"Create a DLL">;
67 def driver : P<"driver", "Generate a Windows NT Kernel Mode Driver">;
68 def nodefaultlib_all : F<"nodefaultlib">;
69 def noentry : F<"noentry">;
70 def profile : F<"profile">;
71 def swaprun_cd : F<"swaprun:cd">;
72 def swaprun_net : F<"swaprun:net">;
73 def verbose : F<"verbose">;
74
75 def force : F<"force">,
76     HelpText<"Allow undefined symbols when creating executables">;
77 def force_unresolved : F<"force:unresolved">;
78
79 defm allowbind: B<"allowbind", "Disable DLL binding">;
80 defm allowisolation : B<"allowisolation", "Set NO_ISOLATION bit">;
81 defm dynamicbase : B<"dynamicbase",
82                      "Disable address space layout randomization">;
83 defm fixed    : B<"fixed", "Enable base relocations">;
84 defm highentropyva : B<"highentropyva", "Set HIGH_ENTROPY_VA bit">;
85 defm largeaddressaware : B<"largeaddressaware", "Disable large addresses">;
86 defm nxcompat : B<"nxcompat", "Disable data execution provention">;
87 defm safeseh : B<"safeseh", "Produce an image with Safe Exception Handler">;
88 defm tsaware  : B<"tsaware", "Create non-Terminal Server aware executable">;
89
90 def help : F<"help">;
91 def help_q : Flag<["/?", "-?"], "">, Alias<help>;
92
93 // LLD extensions
94 def nosymtab : F<"nosymtab">;
95
96 // Flags for debugging
97 def debugpdb : F<"debugpdb">;
98 def dumppdb : Joined<["/", "-"], "dumppdb">;
99 def lldmap : F<"lldmap">;
100 def lldmap_file : Joined<["/", "-"], "lldmap:">;
101
102 //==============================================================================
103 // The flags below do nothing. They are defined only for link.exe compatibility.
104 //==============================================================================
105
106 class QF<string name> : Joined<["/", "-", "-?"], name#":">;
107
108 multiclass QB<string name> {
109   def "" : F<name>;
110   def _no : F<name#":no">;
111 }
112
113 def functionpadmin : F<"functionpadmin">;
114 def ignoreidl : F<"ignoreidl">;
115 def incremental : F<"incremental">;
116 def no_incremental : F<"incremental:no">;
117 def nologo : F<"nologo">;
118 def throwingnew : F<"throwingnew">;
119 def editandcontinue : F<"editandcontinue">;
120 def fastfail : F<"fastfail">;
121
122 def delay : QF<"delay">;
123 def errorreport : QF<"errorreport">;
124 def idlout : QF<"idlout">;
125 def ignore : QF<"ignore">;
126 def maxilksize : QF<"maxilksize">;
127 def pdbaltpath : QF<"pdbaltpath">;
128 def tlbid : QF<"tlbid">;
129 def tlbout : QF<"tlbout">;
130 def verbose_all : QF<"verbose">;
131 def guardsym : QF<"guardsym">;
132
133 defm wx : QB<"wx">;