You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/etc/zsh/_rust
+93-69Lines changed: 93 additions & 69 deletions
Original file line number
Diff line number
Diff line change
@@ -20,63 +20,71 @@ _rustc_crate_types=(
20
20
21
21
_rustc_emit_types=(
22
22
'asm'
23
-
'bc'
24
-
'ir'
23
+
'llvm-bc'
24
+
'llvm-ir'
25
25
'obj'
26
26
'link'
27
+
'dep-info'
27
28
)
28
29
_rustc_pretty_types=(
29
30
'normal[un-annotated source]'
30
31
'expanded[crates expanded]'
31
32
'typed[crates expanded, with type annotations]'
32
33
'identified[fully parenthesized, AST nodes and blocks with IDs]'
33
-
'flowgraph=[graphviz formatted flowgraph for node]:NODEID:'
34
+
'flowgraph[graphviz formatted flowgraph for node]:NODEID:'
34
35
)
35
36
_rustc_color_types=(
36
37
'auto[colorize, if output goes to a tty (default)]'
37
38
'always[always colorize output]'
38
39
'never[never colorize output]'
39
40
)
41
+
_rustc_info_types=(
42
+
'crate-name[Output the crate name and exit]'
43
+
'file-names[Output the file(s) that would be written if compilation continued and exited]'
44
+
'sysroot[Output the sysroot and exit]'
45
+
)
40
46
41
47
_rustc_opts_vals=(
42
48
--crate-name='[Specify the name of the crate being built]'
43
49
--crate-type='[Comma separated list of types of crates for the compiler to emit]:TYPES:_values -s "," "Crate types" "$_rustc_crate_types[@]"'
44
50
--emit='[Comma separated list of types of output for the compiler to emit]:TYPES:_values -s "," "Emit Targets" "$_rustc_emit_types[@]"'
45
-
--debuginfo='[Emit DWARF debug info to the objects created]:LEVEL:_values "Debug Levels" "$_rustc_debuginfo_levels[@]"'
46
-
--dep-info='[Output dependency info to <filename> after compiling]::FILE:_files -/'
47
-
--sysroot='[Override the system root]:PATH:_files -/'
48
51
--cfg='[Configure the compilation environment]:SPEC:'
49
52
--out-dir='[Write output to compiler-chosen filename in <dir>. Ignored if -o is specified. (default the current directory)]:DIR:_files -/'
50
53
-o'[Write output to <filename>. Ignored if more than one --emit is specified.]:FILENAME:_files'
51
-
--opt-level='[Optimize with possible levels 0-3]:LEVEL:(0 1 2 3)'
52
54
--pretty='[Pretty-print the input instead of compiling]::TYPE:_values "TYPES" "$_rustc_pretty_types[@]"'
53
55
-L'[Add a directory to the library search path]:DIR:_files -/'
54
56
--target='[Target triple cpu-manufacturer-kernel\[-os\] to compile]:TRIPLE:'
55
57
--color='[Configure coloring of output]:CONF:_values "COLORS" "$_rustc_color_types[@]"'
56
58
{-v,--version}'[Print version info and exit]::VERBOSE:(verbose)'
57
59
--explain='[Provide a detailed explanation of an error message]:OPT:'
58
60
--extern'[Specify where an external rust library is located]:ARG:'
61
+
--print='[Comma separated list of compiler information to print on stdout]:TYPES:_values -s "," "Compiler Information" "$_rustc_info_types[@]"'
59
62
)
60
63
61
64
_rustc_opts_switches=(
62
-
-g'[Equivalent to --debuginfo=2]'
63
-
{-h,--help}'[Display this message]'
64
-
--no-analysis'[Parse and expand the output, but run no analysis or produce output]'
65
-
--no-trans'[Run all passes except translation; no output]'
66
-
-O'[Equivalent to --opt-level=2]'
67
-
--parse-only'[Parse only; do not compile, assemble, or link]'
68
-
--print-crate-name'[Output the crate name and exit]'
69
-
--print-file-name'[Output the file(s) that would be written if compilation continued and exit]'
65
+
-g'[Equivalent to -C debuginfo=2]'
66
+
{-h,--help}'[Display the help message]'
67
+
{-V,--verbose}'[use verbose output]'
68
+
-O'[Equivalent to -C opt-level=2]'
70
69
--test'[Build a test harness]'
71
70
)
71
+
72
+
73
+
_rustc_opts_link=(
74
+
'static[Path to the library to link statically]:PATH:_files -/'
75
+
'dylib[Path to the library to link dynamically]:PATH:_files -/'
76
+
'framework[Path to the library to link as a framework]:PATH:_files -/'
77
+
)
78
+
72
79
_rustc_opts_codegen=(
73
-
'ar=[Path to the archive utility to use when assembling archives.]:BIN:_path_files'
74
-
'linker=[Path to the linker utility to use when linking libraries, executables, and objects.]:BIN:_path_files'
75
-
'link-args=[A space-separated list of extra arguments to pass to the linker when the linker is invoked.]:ARGS:'
76
-
'target-cpu=[Selects a target processor. If the value is "help", then a list of available CPUs is printed.]:CPU:'
77
-
'target-feature=[A space-separated list of features to enable or disable for the target. A preceding "+" enables a feature while a preceding "-" disables it. Available features can be discovered through target-cpu=help.]:FEATURE:'
78
-
'passes=[A space-separated list of extra LLVM passes to run. A value of "list" will cause rustc to print all known passes and exit. The passes specified are appended at the end of the normal pass manager.]:LIST:'
79
-
'llvm-args=[A space-separated list of arguments to pass through to LLVM.]:ARGS:'
80
+
'ar[Path to the archive utility to use when assembling archives.]:BIN:_path_files'
81
+
'linker[Path to the linker utility to use when linking libraries, executables, and objects.]:BIN:_path_files'
82
+
'link-args[A space-separated list of extra arguments to pass to the linker when the linker is invoked.]:ARGS:'
83
+
'lto[Perform LLVM link-time optimizations]'
84
+
'target-cpu[Selects a target processor. If the value is "help", then a list of available CPUs is printed.]:CPU:'
85
+
'target-feature[A space-separated list of features to enable or disable for the target. A preceding "+" enables a feature while a preceding "-" disables it. Available features can be discovered through target-cpu=help.]:FEATURE:'
86
+
'passes[A space-separated list of extra LLVM passes to run. A value of "list" will cause rustc to print all known passes and exit. The passes specified are appended at the end of the normal pass manager.]:LIST:'
87
+
'llvm-args[A space-separated list of arguments to pass through to LLVM.]:ARGS:'
80
88
'save-temps[If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated throughout compilation in the output directory.]'
81
89
'rpath[If specified, then the rpath value for dynamic libraries will be set in either dynamic library or executable outputs.]'
82
90
'no-prepopulate-passes[Suppresses pre-population of the LLVM pass manager that is run over the module.]'
@@ -86,55 +94,62 @@ _rustc_opts_codegen=(
86
94
'prefer-dynamic[Prefers dynamic linking to static linking.]'
87
95
"no-integrated-as[Force usage of an external assembler rather than LLVM's integrated one.]"
88
96
'no-redzone[disable the use of the redzone]'
89
-
'relocation-model=[The relocation model to use. (default: pic)]:MODEL:(pic static dynamic-no-pic)'
90
-
'code-model=[choose the code model to use (llc -code-model for details)]:MODEL:'
91
-
'metadata=[metadata to mangle symbol names with]:VAL:'
92
-
'extra-filenames=[extra data to put in each output filename]:VAL:'
93
-
'codegen-units=[divide crate into N units to optimize in parallel]:N:'
97
+
'relocation-model[The relocation model to use. (default: pic)]:MODEL:(pic static dynamic-no-pic)'
98
+
'code-model[choose the code model to use (llc -code-model for details)]:MODEL:'
99
+
'metadata[metadata to mangle symbol names with]:VAL:'
100
+
'extra-filenames[extra data to put in each output filename]:VAL:'
101
+
'codegen-units[divide crate into N units to optimize in parallel]:N:'
102
+
'remark[print remarks for these optimization passes (space separated, or "all")]:TYPE:'
103
+
'debuginfo[debug info emission level, 0 = no debug info, 1 = line tables only, 2 = full debug info with variable and type information]:LEVEL:_values "Debug Levels" "$_rustc_debuginfo_levels[@]"'
104
+
'opt-level[Optimize with possible levels 0-3]:LEVEL:(0 1 2 3)'
94
105
'help[Show all codegen options]'
95
106
)
96
107
97
108
_rustc_opts_lint=(
98
109
'help[Show a list of all lints]'
99
-
'experimental[detects use of #\[experimental\] items]'
100
-
'heap-memory[use of any (Box type or @ type) heap memory]'
101
-
'managed-heap-memory[use of managed (@ type) heap memory]'
102
-
'missing-doc[detects missing documentation for public members]'
103
-
'non-uppercase-statics[static constants should have uppercase identifiers]'
104
-
'owned-heap-memory[use of owned (~ type) heap memory]'
'*-l[Link the generated crates to the specified native library NAME. the optional KIND can be one of, static, dylib, or framework. If omitted, dylib is assumed.]:ARG:_rustc_opts_fun_link' \
0 commit comments