]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - MinGW/Options.td
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / MinGW / Options.td
1 include "llvm/Option/OptParser.td"
2
3 class F<string name>: Flag<["--", "-"], name>;
4 class J<string name>: Joined<["--", "-"], name>;
5 class S<string name>: Separate<["--", "-"], name>;
6
7 def L: JoinedOrSeparate<["-"], "L">, MetaVarName<"<dir>">,
8   HelpText<"Add a directory to the library search path">;
9 def dynamicbase: F<"dynamicbase">, HelpText<"Enable ASLR">;
10 def entry: S<"entry">, MetaVarName<"<entry>">,
11   HelpText<"Name of entry point symbol">;
12 def export_all_symbols: F<"export-all-symbols">,
13     HelpText<"Export all symbols even if a def file or dllexport attributes are used">;
14 def gc_sections: F<"gc-sections">, HelpText<"Remove unused sections">;
15 def icf: J<"icf=">, HelpText<"Identical code folding">;
16 def image_base: S<"image-base">, HelpText<"Base address of the program">;
17 def kill_at: F<"kill-at">, HelpText<"Remove @n from exported symbols">;
18 def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"<libName>">,
19   HelpText<"Root name of library to use">;
20 def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">;
21 def map: S<"Map">, HelpText<"Output a linker map">;
22 def map_eq: J<"Map=">, Alias<map>;
23 def no_whole_archive: F<"no-whole-archive">,
24     HelpText<"No longer include all object files for following archives">;
25 def large_address_aware: Flag<["--"], "large-address-aware">,
26     HelpText<"Enable large addresses">;
27 def no_gc_sections: F<"no-gc-sections">, HelpText<"Don't remove unused sections">;
28 def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">,
29   HelpText<"Path to file to write output">;
30 def out_implib: Separate<["--"], "out-implib">, HelpText<"Import library name">;
31 def out_implib_eq: Joined<["--"], "out-implib=">, Alias<out_implib>;
32 def output_def: S<"output-def">, HelpText<"Output def file">;
33 def shared: F<"shared">, HelpText<"Build a shared object">;
34 def subs: S<"subsystem">, HelpText<"Specify subsystem">;
35 def stack: S<"stack">;
36 def strip_all: F<"strip-all">,
37     HelpText<"Omit all symbol information from the output binary">;
38 def strip_debug: F<"strip-debug">,
39     HelpText<"Omit all debug information, but keep symbol information">;
40 def whole_archive: F<"whole-archive">,
41     HelpText<"Include all object files for following archives">;
42 def verbose: F<"verbose">, HelpText<"Verbose mode">;
43
44 // LLD specific options
45 def _HASH_HASH_HASH : Flag<["-"], "###">,
46     HelpText<"Print (but do not run) the commands to run for this compilation">;
47 def mllvm: S<"mllvm">;
48 def pdb: S<"pdb">, HelpText<"Specify output PDB debug information file">;
49 def Xlink : J<"Xlink=">, MetaVarName<"<arg>">,
50     HelpText<"Pass <arg> to the COFF linker">;
51
52 // Currently stubs to avoid errors
53 def Bdynamic: F<"Bdynamic">, HelpText<"Link against shared libraries">;
54 def Bstatic: F<"Bstatic">, HelpText<"Do not link against shared libraries">;
55 def O: Joined<["-"], "O">, HelpText<"Optimize output file size">;
56 def build_id: F<"build-id">;
57 def disable_auto_image_base: F<"disable-auto-image-base">;
58 def enable_auto_image_base: F<"enable-auto-image-base">;
59 def enable_auto_import: F<"enable-auto-import">;
60 def end_group: F<"end-group">;
61 def full_shutdown: Flag<["--"], "full-shutdown">;
62 def high_entropy_va: F<"high-entropy-va">, HelpText<"Enable 64-bit ASLR">;
63 def major_image_version: S<"major-image-version">;
64 def minor_image_version: S<"minor-image-version">;
65 def no_seh: F<"no-seh">;
66 def nxcompat: F<"nxcompat">, HelpText<"Enable data execution prevention">;
67 def pic_executable: F<"pic-executable">;
68 def sysroot: J<"sysroot">, HelpText<"Sysroot">;
69 def start_group: F<"start-group">;
70 def tsaware: F<"tsaware">, HelpText<"Create Terminal Server aware executable">;
71 def v: Flag<["-"], "v">, HelpText<"Display the version number">;
72 def version: F<"version">, HelpText<"Display the version number and exit">;
73
74 // Alias
75 def alias_entry_e: JoinedOrSeparate<["-"], "e">, Alias<entry>;
76 def alias_strip_s: Flag<["-"], "s">, Alias<strip_all>;
77 def alias_strip_S: Flag<["-"], "S">, Alias<strip_debug>;