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