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