2013-04-05 02:59:24 +08:00
|
|
|
include "llvm/Option/OptParser.td"
|
|
|
|
|
2013-07-19 09:02:49 +08:00
|
|
|
|
2013-04-05 02:59:24 +08:00
|
|
|
// output kinds
|
2013-07-19 09:02:49 +08:00
|
|
|
def grp_kind : OptionGroup<"outs">, HelpText<"OUTPUT KIND">;
|
2013-09-04 08:24:35 +08:00
|
|
|
def relocatable : Flag<["-"], "r">,
|
2013-07-19 09:02:49 +08:00
|
|
|
HelpText<"Create relocatable object file">, Group<grp_kind>;
|
2013-09-04 08:24:35 +08:00
|
|
|
def static : Flag<["-"], "static">,
|
2013-07-19 09:02:49 +08:00
|
|
|
HelpText<"Create static executable">, Group<grp_kind>;
|
2013-09-04 08:24:35 +08:00
|
|
|
def dynamic : Flag<["-"], "dynamic">,
|
2013-07-19 09:02:49 +08:00
|
|
|
HelpText<"Create dynamic executable (default)">,Group<grp_kind>;
|
2013-09-04 08:24:35 +08:00
|
|
|
def dylib : Flag<["-"], "dylib">,
|
2013-07-19 09:02:49 +08:00
|
|
|
HelpText<"Create dynamic library">, Group<grp_kind>;
|
2013-09-04 08:24:35 +08:00
|
|
|
def bundle : Flag<["-"], "bundle">,
|
2013-07-19 09:02:49 +08:00
|
|
|
HelpText<"Create dynamic bundle">, Group<grp_kind>;
|
2013-09-04 08:24:35 +08:00
|
|
|
def execute : Flag<["-"], "execute">,
|
2013-07-19 09:02:49 +08:00
|
|
|
HelpText<"Create main executable (default)">, Group<grp_kind>;
|
2013-09-04 08:24:35 +08:00
|
|
|
def preload : Flag<["-"], "preload">,
|
2013-07-19 09:02:49 +08:00
|
|
|
HelpText<"Create preload">, Group<grp_kind>;
|
|
|
|
|
|
|
|
// optimizations
|
|
|
|
def grp_opts : OptionGroup<"opts">, HelpText<"OPTIMIZATIONS">;
|
|
|
|
def dead_strip : Flag<["-"], "dead_strip">,
|
|
|
|
HelpText<"Remove unreference code and data">, Group<grp_opts>;
|
2013-09-04 08:24:35 +08:00
|
|
|
def macosx_version_min : Separate<["-"], "macosx_version_min">,
|
2013-07-19 09:02:49 +08:00
|
|
|
HelpText<"Minimum Mac OS X version">, Group<grp_opts>;
|
2013-09-04 08:24:35 +08:00
|
|
|
def ios_version_min : Separate<["-"], "ios_version_min">,
|
2013-07-19 09:02:49 +08:00
|
|
|
HelpText<"Minimum iOS version">, Group<grp_opts>;
|
2013-09-04 08:24:35 +08:00
|
|
|
def ios_simulator_version_min : Separate<["-"], "ios_simulator_version_min">,
|
2013-07-19 09:02:49 +08:00
|
|
|
HelpText<"Minimum iOS simulator version">, Group<grp_opts>;
|
2013-09-04 08:24:35 +08:00
|
|
|
def mllvm : Separate<["-"], "mllvm">,
|
2013-07-19 09:02:49 +08:00
|
|
|
HelpText<"Options to pass to LLVM during LTO">, Group<grp_opts>;
|
|
|
|
|
|
|
|
// main executable options
|
|
|
|
def grp_main : OptionGroup<"opts">, HelpText<"MAIN EXECUTABLE OPTIONS">;
|
|
|
|
def entry : Separate<["-"], "e">, HelpText<"entry symbol name">,Group<grp_main>;
|
2013-04-05 02:59:24 +08:00
|
|
|
|
2013-07-19 09:02:49 +08:00
|
|
|
// dylib executable options
|
|
|
|
def grp_dylib : OptionGroup<"opts">, HelpText<"DYLIB EXECUTABLE OPTIONS">;
|
2013-09-11 07:55:14 +08:00
|
|
|
def install_name : Separate<["-"], "install_name">,
|
|
|
|
HelpText<"The dylib's install name">, Group<grp_dylib>;
|
|
|
|
def mark_dead_strippable_dylib : Flag<["-"], "mark_dead_strippable_dylib">,
|
|
|
|
HelpText<"Marks the dylib as having no side effects during initialization">,
|
|
|
|
Group<grp_dylib>;
|
|
|
|
def compatibility_version : Separate<["-"], "compatibility_version">,
|
|
|
|
HelpText<"The dylib's compatibility version">, Group<grp_dylib>;
|
|
|
|
def current_version : Separate<["-"], "current_version">,
|
|
|
|
HelpText<"The dylib's current version">, Group<grp_dylib>;
|
|
|
|
|
|
|
|
// dylib executable options - compatibility aliases
|
|
|
|
def dylib_install_name : Separate<["-"], "dylib_install_name">,
|
|
|
|
Alias<install_name>;
|
|
|
|
def dylib_compatibility_version :
|
|
|
|
Separate<["-"], "dylib_compatibility_version">,
|
|
|
|
Alias<compatibility_version>;
|
|
|
|
def dylib_current_version : Separate<["-"], "dylib_current_version">,
|
|
|
|
Alias<current_version>;
|
|
|
|
|
|
|
|
// bundle executable options
|
|
|
|
def grp_bundle : OptionGroup<"opts">, HelpText<"BUNDLE EXECUTABLE OPTIONS">;
|
|
|
|
def bundle_loader : Separate<["-"], "bundle_loader">,
|
|
|
|
HelpText<"The executable that will be loading this Mach-O bundle">,
|
|
|
|
Group<grp_bundle>;
|
2013-04-05 02:59:24 +08:00
|
|
|
|
2013-07-19 09:02:49 +08:00
|
|
|
// library options
|
|
|
|
def grp_libs : OptionGroup<"libs">, HelpText<"LIBRARY OPTIONS">;
|
2014-07-10 19:46:08 +08:00
|
|
|
def L : JoinedOrSeparate<["-"], "L">,
|
2013-07-19 09:02:49 +08:00
|
|
|
HelpText<"Add directory to library search path">, Group<grp_libs>;
|
2014-07-10 19:46:13 +08:00
|
|
|
def Z : Flag<["-"], "Z">,
|
|
|
|
HelpText<"Do not search standard directories for libraries or frameworks">;
|
2013-07-19 09:02:49 +08:00
|
|
|
def all_load : Flag<["-"], "all_load">,
|
2013-09-04 08:24:35 +08:00
|
|
|
HelpText<"Forces all members of all static libraries to be loaded">,
|
2013-07-19 09:02:49 +08:00
|
|
|
Group<grp_libs>;
|
2014-07-10 19:21:06 +08:00
|
|
|
def syslibroot : Separate<["-"], "syslibroot">,
|
|
|
|
HelpText<"Add path to SDK to all absolute library search paths">,
|
|
|
|
Group<grp_libs>;
|
|
|
|
|
|
|
|
// Input options
|
|
|
|
def l : Joined<["-"], "l">,
|
|
|
|
HelpText<"Base name of library searched for in -L directories">;
|
2013-09-04 08:24:35 +08:00
|
|
|
|
2014-05-15 05:32:21 +08:00
|
|
|
// test case options
|
2014-07-10 19:21:06 +08:00
|
|
|
def print_atoms : Flag<["-"], "print_atoms">,
|
2014-05-15 05:32:21 +08:00
|
|
|
HelpText<"Emit output as yaml atoms">;
|
2014-07-10 19:21:06 +08:00
|
|
|
def test_libresolution : Flag<["-"], "test_libresolution">,
|
|
|
|
HelpText<"Only files specified by -file_exists are considered to exist."
|
|
|
|
" Print debugging information during resolution">;
|
|
|
|
def path_exists : Separate<["-"], "path_exists">,
|
|
|
|
HelpText<"When used with -test_libresolution, only these paths exist">;
|
|
|
|
|
2013-04-05 02:59:24 +08:00
|
|
|
|
2013-07-19 09:02:49 +08:00
|
|
|
// general options
|
|
|
|
def output : Separate<["-"], "o">, HelpText<"Output file path">;
|
|
|
|
def arch : Separate<["-"], "arch">, HelpText<"Architecture to link">;
|
2014-07-30 08:58:06 +08:00
|
|
|
def sectalign : MultiArg<["-"], "sectalign", 3>,
|
|
|
|
HelpText<"alignment for segment/section">;
|
2014-08-01 02:19:03 +08:00
|
|
|
def t : Flag<["-"], "t">,
|
|
|
|
HelpText<"Print the names of the input files as ld processes them">;
|
2014-07-30 08:58:06 +08:00
|
|
|
|
2013-04-05 02:59:24 +08:00
|
|
|
|
2013-07-19 09:02:49 +08:00
|
|
|
// extras
|
|
|
|
def help : Flag<["-"], "help">;
|