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">;
|
|
|
|
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-12 05:36:37 +08:00
|
|
|
def mllvm: S<"mllvm">;
|
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-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-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-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-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-09-12 01:02:59 +08:00
|
|
|
def full_shutdown: Flag<["--"], "full-shutdown">;
|
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-09-12 04:43:43 +08:00
|
|
|
def sysroot: J<"sysroot">, HelpText<"Sysroot">;
|
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>;
|