include "llvm/Option/OptParser.td" // Flags that lld/MachO understands but ld64 doesn't. These take // '--' instead of '-' and use dashes instead of underscores, so // they don't collide with the ld64 compat options. def help : Flag<["-", "--"], "help">; def help_hidden : Flag<["--"], "help-hidden">, HelpText<"Display help for hidden options">; def color_diagnostics: Flag<["--"], "color-diagnostics">, HelpText<"Alias for --color-diagnostics=always">; def no_color_diagnostics: Flag<["--"], "no-color-diagnostics">, HelpText<"Alias for --color-diagnostics=never">; def color_diagnostics_eq: Joined<["--"], "color-diagnostics=">, HelpText<"Use colors in diagnostics (default: auto)">, MetaVarName<"[auto,always,never]">; def reproduce: Separate<["--"], "reproduce">; def reproduce_eq: Joined<["--"], "reproduce=">, Alias(reproduce)>, HelpText<"Write tar file containing inputs and command to reproduce link">; // This is a complete Options.td compiled from Apple's ld(1) manpage // dated 2018-03-07 and cross checked with ld64 source code in repo // https://github.com/apple-opensource/ld64 at git tag "512.4" dated // 2018-03-18. // Flags<[HelpHidden]> marks options that are not yet ported to lld, // and serve as a scoreboard for annotating our progress toward // implementing ld64 options in lld. As you add implementions to // Driver.cpp, please remove the hidden flag here. def grp_kind : OptionGroup<"kind">, HelpText<"OUTPUT KIND">; def execute : Flag<["-"], "execute">, HelpText<"Produce a main executable (default)">, Group; def dylib : Flag<["-"], "dylib">, HelpText<"Produce a shared library">, Group; def bundle : Flag<["-"], "bundle">, HelpText<"Produce a bundle">, Group; def r : Flag<["-"], "r">, HelpText<"Merge multiple object files into one, retaining relocations">, Flags<[HelpHidden]>, Group; def dylinker : Flag<["-"], "dylinker">, HelpText<"Produce a dylinker only used when building dyld">, Flags<[HelpHidden]>, Group; def dynamic : Flag<["-"], "dynamic">, HelpText<"Link dynamically (default)">, Group; def static : Flag<["-"], "static">, HelpText<"Link statically">, Flags<[HelpHidden]>, Group; def preload : Flag<["-"], "preload">, HelpText<"Produce an unsegmented binary for embedded systems">, Flags<[HelpHidden]>, Group; def arch : Separate<["-"], "arch">, MetaVarName<"">, HelpText<"The architecture (e.g. ppc, ppc64, i386, x86_64)">, Group; def o : Separate<["-"], "o">, MetaVarName<"">, HelpText<"The name of the output file (default: `a.out')">, Group; def grp_libs : OptionGroup<"libs">, HelpText<"LIBRARIES">; def l : Joined<["-"], "l">, MetaVarName<"">, HelpText<"Search for lib.dylib or lib.a on the library search path">, Group; def weak_l : Joined<["-"], "weak-l">, MetaVarName<"">, HelpText<"Like -l, but mark library and its references as weak imports">, Group; def weak_library : Separate<["-"], "weak_library">, MetaVarName<"">, HelpText<"Like bare , but mark library and its references as weak imports">, Group; def reexport_l : Joined<["-"], "reexport-l">, MetaVarName<"">, HelpText<"Like -l, but export all symbols of from newly created library">, Flags<[HelpHidden]>, Group; def reexport_library : Separate<["-"], "reexport_library">, MetaVarName<"">, HelpText<"Like bare , but export all symbols of from newly created library">, Flags<[HelpHidden]>, Group; def upward_l : Joined<["-"], "upward-l">, MetaVarName<"">, HelpText<"Like -l, but specify dylib as an upward dependency">, Flags<[HelpHidden]>, Group; def upward_library : Separate<["-"], "upward_library">, MetaVarName<"">, HelpText<"Like bare , but specify dylib as an upward dependency">, Flags<[HelpHidden]>, Group; def L : JoinedOrSeparate<["-"], "L">, MetaVarName<"">, HelpText<"Add dir to the library search path">, Group; def Z : Flag<["-"], "Z">, HelpText<"Remove standard directories from the library and framework search paths">, Group; def syslibroot : Separate<["-"], "syslibroot">, MetaVarName<"">, HelpText<"Prepend to all library and framework search paths">, Group; def search_paths_first : Flag<["-"], "search_paths_first">, HelpText<"Search for lib.dylib and lib.a at each step in traversing search path (default for Xcode 4 and later)">, Group; def search_dylibs_first : Flag<["-"], "search_dylibs_first">, HelpText<"Search for lib.dylib on first pass, then for lib.a on second pass through search path (default for Xcode 3 and earlier)">, Group; def framework : Separate<["-"], "framework">, MetaVarName<"">, HelpText<"Search for .framework/ on the framework search path">, Group; def weak_framework : Separate<["-"], "weak_framework">, MetaVarName<"">, HelpText<"Like -framework , but mark framework and its references as weak imports">, Group; def reexport_framework : Separate<["-"], "reexport_framework">, MetaVarName<"">, HelpText<"Like -framework , but export all symbols of from the newly created library">, Flags<[HelpHidden]>, Group; def upward_framework : Separate<["-"], "upward_framework">, MetaVarName<"">, HelpText<"Like -framework , but specify the framework as an upward dependency">, Flags<[HelpHidden]>, Group; def F : JoinedOrSeparate<["-"], "F">, MetaVarName<"">, HelpText<"Add dir to the framework search path">, Group; def all_load : Flag<["-"], "all_load">, HelpText<"Load all members of all static archive libraries">, Group; def ObjC : Flag<["-"], "ObjC">, HelpText<"Load all members of static archives that are an Objective-C class or category.">, Group; def force_load : Separate<["-"], "force_load">, MetaVarName<"">, HelpText<"Load all members static archive library at ">, Group; def grp_content : OptionGroup<"content">, HelpText<"ADDITIONAL CONTENT">; def sectcreate : MultiArg<["-"], "sectcreate", 3>, MetaVarName<"
">, HelpText<"Create
in from the contents of ">, Group; def segcreate : MultiArg<["-"], "segcreate", 3>, MetaVarName<"
">, Alias, HelpText<"Alias for -sectcreate">, Flags<[HelpHidden]>, Group; def filelist : Separate<["-"], "filelist">, MetaVarName<"">, HelpText<"Read names of files to link from ">, Group; def dtrace : Separate<["-"], "dtrace">, MetaVarName<"