1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-22 10:27:48 +03:00
mold/options.td
2020-11-30 17:58:40 +09:00

58 lines
1.8 KiB
TableGen

include "llvm/Option/OptParser.td"
class F<string name>: Flag<["--", "-"], name>;
class J<string name>: Joined<["--", "-"], name>;
multiclass Eq<string name, string help> {
def NAME: Separate<["--", "-"], name>;
def NAME # _eq: Joined<["--", "-"], name # "=">, Alias<!cast<Separate>(NAME)>,
HelpText<help>;
}
def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">,
HelpText<"Path to file to write output">;
def print_map: F<"print-map">,
HelpText<"Print a link map to the standard output">;
defm thread_count: Eq<"thread-count", "Number of threads to use">;
def stat: F<"stat">;
def static: F<"static">, HelpText<"Do not link against shared libraries">;
defm trace_symbol: Eq<"trace-symbol", "Trace references to symbol">;
def trace: F<"trace">, HelpText<"Print the name of each input file">;
def filler: Separate<["--", "-"], "filler">;
defm library: Eq<"library", "Root name of library to use">,
MetaVarName<"<libName>">;
defm library_path: Eq<"library-path", "Add a directory to the library search path">,
MetaVarName<"<dir>">;
defm sysroot: Eq<"sysroot", "Set the system root">;
defm dynamic_linker: Eq<"dynamic-linker", "Which dynamic linker to use">;
def: JoinedOrSeparate<["-"], "l">, Alias<library>, HelpText<"Alias for --library">;
def: JoinedOrSeparate<["-"], "L">, Alias<library_path>, HelpText<"Alias for --library-path">;
def: JoinedOrSeparate<["-"], "y">, Alias<trace_symbol>, HelpText<"Alias for --trace-symbol">;
def as_needed: F<"as-needed">;
def no_as_needed: F<"no-as-needed">;
defm rpath: Eq<"rpath", "Add a DT_RUNPATH to the output">;
def: JoinedOrSeparate<["-"], "z">;
def: F<"hash-style">;
def: J<"hash-style=">;
def: F<"build-id">;
def: J<"build-id=">;
def: F<"eh-frame-hdr">;
def: JoinedOrSeparate<["-"], "m">;
def: F<"start-group">;
def: F<"end-group">;