2015-07-25 05:03:07 +08:00
|
|
|
include "llvm/Option/OptParser.td"
|
|
|
|
|
2015-10-02 00:42:03 +08:00
|
|
|
def Bdynamic: Flag<["-"], "Bdynamic">,
|
|
|
|
HelpText<"Link against shared libraries">;
|
|
|
|
|
|
|
|
def Bstatic: Flag<["-"], "Bstatic">,
|
|
|
|
HelpText<"Do not link against shared libraries">;
|
|
|
|
|
2015-10-01 08:33:02 +08:00
|
|
|
def L : Joined<["-"], "L">, MetaVarName<"<dir>">,
|
|
|
|
HelpText<"Directory to search for libraries">;
|
2015-09-12 06:42:45 +08:00
|
|
|
|
2015-10-01 08:33:02 +08:00
|
|
|
def allow_multiple_definition: Flag<["--"], "allow-multiple-definition">,
|
|
|
|
HelpText<"Allow multiple definitions">;
|
2015-09-17 04:45:57 +08:00
|
|
|
|
2015-10-02 22:21:24 +08:00
|
|
|
def allow_shlib_undefined : Flag<["--", "-"], "allow-shlib-undefined">;
|
2015-10-02 01:33:38 +08:00
|
|
|
|
2015-10-07 00:20:00 +08:00
|
|
|
def disable_new_dtags : Flag<["--"], "disable-new-dtags">,
|
|
|
|
HelpText<"Disable new dynamic tags">;
|
|
|
|
|
2015-09-17 04:45:57 +08:00
|
|
|
def discard_all : Flag<["-"], "discard-all">,
|
2015-10-01 08:33:02 +08:00
|
|
|
HelpText<"Delete all local symbols">;
|
2015-09-21 07:35:56 +08:00
|
|
|
|
2015-09-21 05:58:12 +08:00
|
|
|
def discard_locals : Flag<["-"], "discard-locals">,
|
2015-10-01 08:33:02 +08:00
|
|
|
HelpText<"Delete temporary local symbols">;
|
2015-09-21 07:35:56 +08:00
|
|
|
|
2015-10-01 08:33:02 +08:00
|
|
|
def discard_none : Flag<["-"], "discard-none">,
|
|
|
|
HelpText<"Keep all symbols in the symbol table">;
|
2015-09-23 07:38:23 +08:00
|
|
|
|
2015-10-03 17:32:48 +08:00
|
|
|
def dynamic_linker : Separate<["--", "-"], "dynamic-linker">,
|
2015-10-01 08:33:02 +08:00
|
|
|
HelpText<"Which dynamic linker to use">;
|
2015-09-26 03:24:57 +08:00
|
|
|
|
2015-10-07 00:20:00 +08:00
|
|
|
def enable_new_dtags : Flag<["--"], "enable-new-dtags">,
|
|
|
|
HelpText<"Enable new dynamic tags">;
|
|
|
|
|
2015-10-01 08:33:02 +08:00
|
|
|
def entry : Separate<["--", "-"], "entry">, MetaVarName<"<entry>">,
|
|
|
|
HelpText<"Name of entry point symbol">;
|
2015-09-24 23:08:23 +08:00
|
|
|
|
2015-10-02 22:21:24 +08:00
|
|
|
def export_dynamic : Flag<["--", "-"], "export-dynamic">,
|
2015-10-01 08:33:02 +08:00
|
|
|
HelpText<"Put symbols in the dynamic symbol table">;
|
2015-09-28 20:52:21 +08:00
|
|
|
|
2015-10-05 18:29:46 +08:00
|
|
|
def fini : Separate<["-"], "fini">, MetaVarName<"<symbol>">,
|
|
|
|
HelpText<"Specify a finalizer function">;
|
|
|
|
|
2015-10-06 20:08:08 +08:00
|
|
|
def init : Separate<["-"], "init">, MetaVarName<"<symbol>">,
|
2015-10-05 18:29:46 +08:00
|
|
|
HelpText<"Specify an initializer function">;
|
|
|
|
|
2015-10-01 08:33:02 +08:00
|
|
|
def l : Joined<["-"], "l">, MetaVarName<"<libName>">,
|
|
|
|
HelpText<"Root name of library to use">;
|
2015-09-29 04:30:11 +08:00
|
|
|
|
2015-10-07 17:13:03 +08:00
|
|
|
def m : Separate<["-"], "m">,
|
|
|
|
HelpText<"Set target emulation">;
|
|
|
|
|
2015-10-02 01:33:38 +08:00
|
|
|
def no_allow_shlib_undefined : Flag<["--"], "no-allow-shlib-undefined">;
|
|
|
|
|
2015-10-02 02:02:21 +08:00
|
|
|
def no_whole_archive : Flag<["--"], "no-whole-archive">,
|
|
|
|
HelpText<"Restores the default behavior of loading archive members">;
|
|
|
|
|
2015-10-01 08:33:02 +08:00
|
|
|
def noinhibit_exec : Flag<["--"], "noinhibit-exec">,
|
|
|
|
HelpText<"Retain the executable output file whenever it is still usable">;
|
2015-09-28 20:52:21 +08:00
|
|
|
|
2015-10-02 04:14:45 +08:00
|
|
|
def no_undefined : Flag<["--"], "no-undefined">,
|
|
|
|
HelpText<"Report unresolved symbols even if the linker is creating a shared library">;
|
|
|
|
|
2015-10-01 08:33:02 +08:00
|
|
|
def output : Separate<["-"], "o">, MetaVarName<"<path>">,
|
|
|
|
HelpText<"Path to file to write output">;
|
2015-09-28 20:52:21 +08:00
|
|
|
|
2015-10-01 08:33:02 +08:00
|
|
|
def rpath : Separate<["-"], "rpath">,
|
|
|
|
HelpText<"Add a DT_RUNPATH to the output">;
|
2015-09-28 20:52:21 +08:00
|
|
|
|
2015-10-01 08:33:02 +08:00
|
|
|
def shared : Flag<["-"], "shared">,
|
|
|
|
HelpText<"Build a shared object">;
|
2015-09-28 23:01:59 +08:00
|
|
|
|
2015-10-02 03:36:04 +08:00
|
|
|
def soname : Joined<["-"], "soname=">,
|
|
|
|
HelpText<"Set DT_SONAME">;
|
|
|
|
|
2015-09-28 23:01:59 +08:00
|
|
|
def sysroot : Joined<["--"], "sysroot=">,
|
2015-10-01 08:33:02 +08:00
|
|
|
HelpText<"Set the system root">;
|
|
|
|
|
2015-10-05 17:43:57 +08:00
|
|
|
def undefined : Joined<["--"], "undefined=">,
|
|
|
|
HelpText<"Force undefined symbol during linking">;
|
|
|
|
|
2015-10-02 02:02:21 +08:00
|
|
|
def whole_archive : Flag<["--"], "whole-archive">,
|
|
|
|
HelpText<"Force load of all members in a static library">;
|
|
|
|
|
2015-10-01 08:33:02 +08:00
|
|
|
// Aliases
|
2015-10-02 00:42:03 +08:00
|
|
|
def alias_Bdynamic_call_shared: Flag<["-"], "call_shared">, Alias<Bdynamic>;
|
|
|
|
def alias_Bdynamic_dy: Flag<["-"], "dy">, Alias<Bdynamic>;
|
|
|
|
def alias_Bstatic_dn: Flag<["-"], "dn">, Alias<Bstatic>;
|
|
|
|
def alias_Bstatic_non_shared: Flag<["-"], "non_shared">, Alias<Bstatic>;
|
|
|
|
def alias_Bstatic_static: Flag<["-"], "static">, Alias<Bstatic>;
|
2015-10-03 05:01:59 +08:00
|
|
|
def alias_L__library_path : Joined<["--"], "library-path=">, Alias<L>;
|
|
|
|
def alias_discard_all_x: Flag<["-"], "x">, Alias<discard_all>;
|
|
|
|
def alias_discard_locals_X: Flag<["-"], "X">, Alias<discard_locals>;
|
|
|
|
def alias_entry_e : Separate<["-"], "e">, Alias<entry>;
|
2015-10-05 18:29:46 +08:00
|
|
|
def alias_fini_fini : Joined<["-"], "fini=">, Alias<fini>;
|
|
|
|
def alias_init_init : Joined<["-"], "init=">, Alias<init>;
|
2015-10-03 05:01:59 +08:00
|
|
|
def alias_l__library : Joined<["--"], "library=">, Alias<l>;
|
2015-10-03 14:54:24 +08:00
|
|
|
def alias_rpath_rpath : Joined<["-"], "rpath=">, Alias<rpath>;
|
2015-10-03 05:01:59 +08:00
|
|
|
def alias_soname_h : Separate<["-"], "h">, Alias<soname>;
|
|
|
|
def alias_soname_soname : Separate<["-"], "soname">, Alias<soname>;
|
2015-10-05 17:43:57 +08:00
|
|
|
def alias_undefined_u : Separate<["-"], "u">, Alias<undefined>;
|
2015-10-01 08:24:54 +08:00
|
|
|
|
|
|
|
// Options listed below are silently ignored now.
|
2015-10-02 22:25:26 +08:00
|
|
|
def O3 : Flag<["-"], "O3">;
|
2015-10-01 08:24:54 +08:00
|
|
|
def as_needed : Flag<["--"], "as-needed">;
|
|
|
|
def build_id : Flag<["--"], "build-id">;
|
|
|
|
def eh_frame_hdr : Flag<["--"], "eh-frame-hdr">;
|
2015-10-02 06:54:37 +08:00
|
|
|
def end_group : Flag<["--"], "end-group">;
|
2015-10-02 22:25:26 +08:00
|
|
|
def gc_sections : Flag<["--"], "gc-sections">;
|
2015-10-01 08:24:54 +08:00
|
|
|
def hash_style : Joined<["--"], "hash-style=">;
|
2015-10-02 06:31:38 +08:00
|
|
|
def no_add_needed : Flag<["--"], "no-add-needed">;
|
2015-10-01 08:24:54 +08:00
|
|
|
def no_as_needed : Flag<["--"], "no-as-needed">;
|
2015-10-02 23:29:31 +08:00
|
|
|
def no_fatal_warnings : Flag<["--"], "no-fatal-warnings">;
|
2015-10-02 06:54:37 +08:00
|
|
|
def start_group : Flag<["--"], "start-group">;
|
2015-10-02 22:25:26 +08:00
|
|
|
def strip_all : Flag<["--"], "strip-all">;
|
2015-10-03 00:20:39 +08:00
|
|
|
def version_script : Separate<["--"], "version-script">;
|
2015-10-01 08:24:54 +08:00
|
|
|
def z : Separate<["-"], "z">;
|