include "llvm/Option/OptParser.td" def WrapperOnlyOption : OptionFlag; def DeviceOnlyOption : OptionFlag; def help : Flag<["--"], "help">, HelpText<"Display available options (--help-hidden for more)">; def help_hidden : Flag<["--"], "help-hidden">, HelpText<"Display all available options">; // Flags for the linker wrapper. def linker_path_EQ : Joined<["--"], "linker-path=">, Flags<[WrapperOnlyOption]>, MetaVarName<"">, HelpText<"The linker executable to invoke">; def cuda_path_EQ : Joined<["--"], "cuda-path=">, Flags<[WrapperOnlyOption]>, MetaVarName<"">, HelpText<"Set the system CUDA path">; def host_triple_EQ : Joined<["--"], "host-triple=">, Flags<[WrapperOnlyOption]>, MetaVarName<"">, HelpText<"Triple to use for the host compilation">; def opt_level : Joined<["--"], "opt-level=">, Flags<[WrapperOnlyOption]>, MetaVarName<"">, HelpText<"Optimization level for LTO">; def bitcode_library_EQ : Joined<["--"], "bitcode-library=">, Flags<[WrapperOnlyOption]>, MetaVarName<"--=">, HelpText<"Extra bitcode library to link">; def device_linker_args_EQ : Joined<["--"], "device-linker=">, Flags<[WrapperOnlyOption]>, MetaVarName<" or =">, HelpText<"Arguments to pass to the device linker invocation">; def dry_run : Flag<["--"], "dry-run">, Flags<[WrapperOnlyOption]>, HelpText<"Print program arguments without running">; def verbose : Flag<["--"], "wrapper-verbose">, Flags<[WrapperOnlyOption]>, HelpText<"Verbose output from tools">; def embed_bitcode : Flag<["--"], "embed-bitcode">, Flags<[WrapperOnlyOption]>, HelpText<"Embed linked bitcode in the module">; def debug : Flag<["--"], "device-debug">, Flags<[WrapperOnlyOption]>, HelpText<"Use debugging">; def ptxas_arg : Joined<["--"], "ptxas-arg=">, Flags<[WrapperOnlyOption]>, HelpText<"Argument to pass to the 'ptxas' invocation">; def pass_remarks_EQ : Joined<["--"], "pass-remarks=">, Flags<[WrapperOnlyOption]>, HelpText<"Pass remarks for LTO">; def pass_remarks_missed_EQ : Joined<["--"], "pass-remarks-missed=">, Flags<[WrapperOnlyOption]>, HelpText<"Pass remarks for LTO">; def pass_remarks_analysis_EQ : Joined<["--"], "pass-remarks-analysis=">, Flags<[WrapperOnlyOption]>, HelpText<"Pass remarks for LTO">; def print_wrapped_module : Flag<["--"], "print-wrapped-module">, Flags<[WrapperOnlyOption]>, HelpText<"Print the wrapped module's IR for testing">; def save_temps : Flag<["--"], "save-temps">, Flags<[WrapperOnlyOption]>, HelpText<"Save intermediate results">; def wrapper_time_trace_eq : Joined<["--"], "wrapper-time-trace=">, Flags<[WrapperOnlyOption]>, MetaVarName<"">, HelpText<"Enable time-trace and write the output to ">; def wrapper_time_trace_granularity : Joined<["--"], "wrapper-time-trace-granularity=">, Flags<[WrapperOnlyOption]>, MetaVarName<"">, HelpText<"Set the granularity of time-trace updates">; def wrapper_jobs : Joined<["--"], "wrapper-jobs=">, Flags<[WrapperOnlyOption]>, MetaVarName<"">, HelpText<"Sets the number of parallel jobs to use for device linking">; // Flags passed to the device linker. def arch_EQ : Joined<["--"], "arch=">, Flags<[DeviceOnlyOption, HelpHidden]>, MetaVarName<"">, HelpText<"The device subarchitecture">; def triple_EQ : Joined<["--"], "triple=">, Flags<[DeviceOnlyOption, HelpHidden]>, MetaVarName<"">, HelpText<"The device target triple">; def whole_program : Flag<["--"], "whole-program">, Flags<[DeviceOnlyOption, HelpHidden]>, HelpText<"LTO has visibility of all input files">; def linker_arg_EQ : Joined<["--"], "linker-arg=">, Flags<[DeviceOnlyOption, HelpHidden]>, HelpText<"An extra argument to be passed to the linker">; // Separator between the linker wrapper and host linker flags. def separator : Flag<["--"], "">, Flags<[WrapperOnlyOption]>, HelpText<"The separator for the wrapped linker arguments">; // Arguments for the LLVM backend. def mllvm : Separate<["-"], "mllvm">, Flags<[WrapperOnlyOption]>, MetaVarName<"">, HelpText<"Arguments passed to the LLVM invocation">; def offload_opt_eq_minus : Joined<["--", "-"], "offload-opt=-">, Flags<[HelpHidden, WrapperOnlyOption]>, HelpText<"Options passed to LLVM">; // Standard linker flags also used by the linker wrapper. def sysroot_EQ : Joined<["--"], "sysroot">, HelpText<"Set the system root">; def o : JoinedOrSeparate<["-"], "o">, MetaVarName<"">, HelpText<"Path to file to write output">; def output_EQ : Joined<["--"], "output=">, Alias, Flags<[HelpHidden]>, HelpText<"Alias for -o">; def output : Separate<["--"], "output">, Alias, Flags<[HelpHidden]>, HelpText<"Alias for -o">; def library_path : JoinedOrSeparate<["-"], "L">, MetaVarName<"">, HelpText<"Add to the library search path">; def library_path_S : Separate<["--", "-"], "library-path">, Flags<[HelpHidden]>, Alias; def library_path_EQ : Joined<["--", "-"], "library-path=">, Flags<[HelpHidden]>, Alias; def library : JoinedOrSeparate<["-"], "l">, MetaVarName<"">, HelpText<"Search for library ">; def library_S : Separate<["--", "-"], "library">, Flags<[HelpHidden]>, Alias; def library_EQ : Joined<["--", "-"], "library=">, Flags<[HelpHidden]>, Alias; def as_needed : Flag<["--", "-"], "as-needed">; def no_as_needed : Flag<["--", "-"], "no-as-needed">; def rpath : Separate<["--", "-"], "rpath">; def rpath_EQ : Joined<["--", "-"], "rpath=">, Flags<[HelpHidden]>, Alias; def dynamic_linker : Separate<["--", "-"], "dynamic-linker">; def dynamic_linker_EQ : Joined<["--", "-"], "dynamic-linker=">, Alias; def v : Flag<["--", "-"], "v">, HelpText<"Display the version number and exit">; def version : Flag<["--", "-"], "version">, Flags<[HelpHidden]>, Alias;