2017-09-12 01:02:59 +08:00
|
|
|
include "llvm/Option/OptParser.td"
|
|
|
|
|
|
|
|
class F<string name>: Flag<["--", "-"], name>;
|
|
|
|
class J<string name>: Joined<["--", "-"], name>;
|
|
|
|
class S<string name>: Separate<["--", "-"], name>;
|
|
|
|
|
|
|
|
def L: JoinedOrSeparate<["-"], "L">, MetaVarName<"<dir>">,
|
|
|
|
HelpText<"Add a directory to the library search path">;
|
2017-11-15 16:18:11 +08:00
|
|
|
def dynamicbase: F<"dynamicbase">, HelpText<"Enable ASLR">;
|
2017-09-12 01:02:59 +08:00
|
|
|
def entry: S<"entry">, MetaVarName<"<entry>">,
|
|
|
|
HelpText<"Name of entry point symbol">;
|
2017-10-12 13:37:18 +08:00
|
|
|
def export_all_symbols: F<"export-all-symbols">,
|
|
|
|
HelpText<"Export all symbols even if a def file or dllexport attributes are used">;
|
2017-09-12 04:54:51 +08:00
|
|
|
def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"<libName>">,
|
|
|
|
HelpText<"Root name of library to use">;
|
2017-09-12 01:02:59 +08:00
|
|
|
def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">;
|
2017-09-13 15:28:09 +08:00
|
|
|
def no_whole_archive: F<"no-whole-archive">,
|
|
|
|
HelpText<"No longer include all object files for following archives">;
|
2017-11-15 16:18:06 +08:00
|
|
|
def large_address_aware: Flag<["--"], "large-address-aware">,
|
|
|
|
HelpText<"Enable large addresses">;
|
2017-09-12 01:02:59 +08:00
|
|
|
def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">,
|
|
|
|
HelpText<"Path to file to write output">;
|
2017-09-12 04:54:51 +08:00
|
|
|
def out_implib: Separate<["--"], "out-implib">, HelpText<"Import library name">;
|
2017-10-27 04:11:58 +08:00
|
|
|
def out_implib_eq: Joined<["--"], "out-implib=">, Alias<out_implib>;
|
2017-10-12 13:37:18 +08:00
|
|
|
def output_def: S<"output-def">, HelpText<"Output def file">;
|
2017-09-12 01:02:59 +08:00
|
|
|
def shared: F<"shared">, HelpText<"Build a shared object">;
|
2017-09-15 02:33:21 +08:00
|
|
|
def subs: S<"subsystem">, HelpText<"Specify subsystem">;
|
|
|
|
def stack: S<"stack">;
|
2017-11-04 06:10:37 +08:00
|
|
|
def strip_all: F<"strip-all">,
|
|
|
|
HelpText<"Omit all symbol information from the output binary">;
|
2017-09-13 15:28:09 +08:00
|
|
|
def whole_archive: F<"whole-archive">,
|
|
|
|
HelpText<"Include all object files for following archives">;
|
2017-09-12 04:43:39 +08:00
|
|
|
def verbose: F<"verbose">, HelpText<"Verbose mode">;
|
|
|
|
|
|
|
|
// LLD specific options
|
|
|
|
def _HASH_HASH_HASH : Flag<["-"], "###">,
|
|
|
|
HelpText<"Print (but do not run) the commands to run for this compilation">;
|
2017-11-03 15:18:37 +08:00
|
|
|
def mllvm: S<"mllvm">;
|
|
|
|
def Xlink : J<"Xlink=">, MetaVarName<"<arg>">,
|
|
|
|
HelpText<"Pass <arg> to the COFF linker">;
|
2017-09-12 01:02:59 +08:00
|
|
|
|
|
|
|
// Currently stubs to avoid errors
|
|
|
|
def Bdynamic: F<"Bdynamic">, HelpText<"Link against shared libraries">;
|
|
|
|
def Bstatic: F<"Bstatic">, HelpText<"Do not link against shared libraries">;
|
2017-09-12 04:54:51 +08:00
|
|
|
def O: Joined<["-"], "O">, HelpText<"Optimize output file size">;
|
2017-09-15 02:33:21 +08:00
|
|
|
def enable_auto_image_base: F<"enable-auto-image-base">;
|
2017-10-27 04:12:01 +08:00
|
|
|
def enable_auto_import: F<"enable-auto-import">;
|
2017-09-12 01:02:59 +08:00
|
|
|
def full_shutdown: Flag<["--"], "full-shutdown">;
|
2017-11-15 16:18:11 +08:00
|
|
|
def high_entropy_va: F<"high-entropy-va">, HelpText<"Enable 64-bit ASLR">;
|
2017-09-15 02:33:21 +08:00
|
|
|
def major_image_version: S<"major-image-version">;
|
|
|
|
def minor_image_version: S<"minor-image-version">;
|
2017-11-15 16:18:11 +08:00
|
|
|
def nxcompat: F<"nxcompat">, HelpText<"Enable data execution prevention">;
|
2017-09-12 04:43:43 +08:00
|
|
|
def sysroot: J<"sysroot">, HelpText<"Sysroot">;
|
2017-11-15 16:18:11 +08:00
|
|
|
def tsaware: F<"tsaware">, HelpText<"Create Terminal Server aware executable">;
|
2017-09-12 01:02:59 +08:00
|
|
|
def v: Flag<["-"], "v">, HelpText<"Display the version number">;
|
|
|
|
def version: F<"version">, HelpText<"Display the version number and exit">;
|
|
|
|
|
|
|
|
// Alias
|
|
|
|
def alias_entry_e: JoinedOrSeparate<["-"], "e">, Alias<entry>;
|
2017-11-04 06:10:37 +08:00
|
|
|
def alias_strip_s: Flag<["-"], "s">, Alias<strip_all>;
|