never` (mutually exclusive), `ignore-loops`, `instruction-threshold=N`, `skip-entry`, `skip-exit`insert function instrument code for XRay-based tracing (default: no) Optional extra settings: `=always` `=never` `=ignore-loops` `=instruction-threshold=N` `=skip-entry` `=skip-exit` Multiple options can be combined with commas.layout_seedseed layout randomizationlink_directiveshonor #[link] directives in the compiled crate (default: yes)link_native_librarieslink native libraries in the linker invocation (default: yes)link_onlylink the `.rlink` file generated by `-Z no-link` (default: no)linker_featuresa list of enabled (`+` prefix) and disabled (`-` prefix) features: `lld`a comma-separated list of linker features to enable (+) or disable (-): `lld`lint_llvm_irlint LLVM IR (default: no)lint MIR before and after each transformation:::. Type must currently be `u32`. Behavior should be one of (`error`, `warning`, `require`, `override`, `append`, `appendunique`, `max`, `min`)a list of module flags to pass to LLVM (space separated)llvm_pluginsa space-separated list of stringsa list LLVM plugins to enable (space separated)llvm_time_tracegenerate JSON tracing data file from LLVM data (default: no)location_detaileither `none`, or a comma separated list of location details to track: `file`, `line`, or `column`what location details should be tracked when using caller_location, either `none`, or a comma separated list of location details, for which valid options are `file`, `line`, and `column` (default: `file,line,column`)lsdecode and print various parts of the crate metadata for a library crate (space separated)macro_backtraceshow macro backtraces (default: no)maximal_hir_to_mir_coveragesave as much information as possible about the correspondence between MIR and HIR as source scopes (default: no)merge_functionsone of: `disabled`, `trampolines`, or `aliases`control the operation of the MergeFunctions LLVM pass, taking the same values as the target option of the same namemeta_statsgather metadata statistics (default: no)metrics_dira paththe directory metrics emitted by rustc are dumped into (implicitly enables default set of metrics)min_function_alignmenta number that is a power of 2 between 1 and 2^29align all functions to at least this many bytes. Must be a power of 2mir_emit_retagemit Retagging MIR statements, interpreted e.g., by miri; implies -Zmir-opt-level=0 (default: no)mir_enable_passesa comma-separated list of strings, with elements beginning with + or -use like `-Zmir-enable-passes=+DestinationPropagation,-InstSimplify`. Forces the specified passes to be enabled, overriding all other checks. In particular, this will enable unsound (known-buggy and hence usually disabled) passes without further warning! Passes that are not specified are enabled or disabled by other flags as usual.mir_include_spanseither a boolean (`yes`, `no`, `on`, `off`, etc), or `nll` (default: `nll`)include extra comments in mir pretty printing, like line numbers and statement indices, details about types, etc. (boolean for all passes, 'nll' to enable in NLL MIR only, default: 'nll')mir_opt_levelMIR optimization level (0-4; default: 1 in non optimized builds and 2 in optimized builds)mir_preserve_ubkeep place mention statements and reads in trivial SwitchInt terminators, which are interpreted e.g., by miri; implies -Zmir-opt-level=0 (default: no)mir_strip_debuginfoone of `none`, `locals-in-tiny-functions`, or `all-locals`Whether to remove some of the MIR debug info from methods. Default: Nonemove_size_limitthe size at which the `large_assignments` lint starts to be emittedmutable_noaliasemit noalias metadata for mutable references (default: yes)namespaced_cratesallow crates to be namespaced by other crates (default: no)next_solvereither `globally` (when used without an argument), `coherence` (default) or `no`enable and configure the next generation trait solver used by rustcnll_factsdump facts from NLL analysis into side files (default: no)nll_facts_dirthe directory the NLL facts are dumped into (default: `nll-facts`)no_analysisparse and expand the source, but run no analysisno_codegenrun all passes except codegen; no outputno_generate_arange_sectionomit DWARF address ranges that give faster lookupsno_implied_bounds_compatdisable the compatibility version of the `implied_bounds_ty` queryno_jump_tablesdisable the jump tables and lookup tables that can be generated from a switch case loweringno_leak_checkdisable the 'leak check' for subtyping; unsound, but useful for testsno_linkcompile without linkingno_parallel_backendrun LLVM in non-parallel mode (while keeping codegen-units and ThinLTO)no_profiler_runtimeprevent automatic injection of the profiler_builtins crateno_trait_vptrdisable generation of trait vptr in vtable for upcastingno_unique_section_namesdo not use unique names for text and data sections when -Z function-sections is usednormalize_docsnormalize associated items in rustdoc when generating documentationon_broken_pipeeither `kill`, `error`, or `inherit`behavior of std::io::ErrorKind::BrokenPipe (SIGPIPE)oomeither `panic` or `abort`panic strategy for out-of-memory handlingosx_rpath_install_namepass `-install_name @rpath/...` to the macOS linker (default: no)packed_bundled_libschange rlib format to store native libraries as archivespanic_abort_testssupport compiling tests with panic=abort (default: no)panic_in_dropeither `unwind` or `abort`panic strategy for panics in dropsparse_crate_root_onlyparse the crate root file only; do not parse other files, compile, assemble, or link (default: no)patchable_function_entryeither two comma separated integers (total_nops,prefix_nops), with prefix_nops <= total_nops, or one integer (total_nops)nop padding at function entrypltwhether to use the PLT when calling into shared libraries; only has effect for PIC code on systems with ELF binaries (default: PLT is disabled if full relro is enabled on x86_64)either no value or `legacy` (the default), or `next`enable polonius-based borrow-checker (default: no)pre_link_arga single extra argument to prepend the linker invocation (can be used several times)pre_link_argsextra arguments to prepend to the linker invocation (space separated)precise_enum_drop_elaborationuse a more precise version of drop elaboration for matches on enums (default: yes). This results in better codegen, but has caused miscompilations on some tier 2 platforms. See #77382 and #74551.print_codegen_statsprint codegen statistics (default: no)print_llvm_passesprint the LLVM optimization passes being run (default: no)print the result of the monomorphization collection pass. Value `lazy` means to use normal collection; `eager` means to collect all items. Note that this overwrites the effect `-Clink-dead-code` has on collection!print layout information for each type encountered (default: no)proc_macro_backtraceshow backtraces for panics during proc-macro execution (default: no)proc_macro_execution_strategyone of supported execution strategies (`same-thread`, or `cross-thread`)how to run proc-macro code (default: same-thread)profile size of closuresprofile_sample_useuse the given `.prof` file for sampled profile-guided optimization (also known as AutoFDO)name of the profiler runtime crate to automatically inject (default: `profiler_builtins`)query_dep_graphenable queries of the dependency graph for regression testing (default: no)randomize the layout of types (default: no)reg_struct_returnOn x86-32 targets, it overrides the default ABI to return small structs in registers. It is UNSOUND to link together crates that use different values for this flag!regparmOn x86-32 targets, setting this to N causes the compiler to pass N arguments in registers EAX, EDX, and ECX instead of on the stack for"C", "cdecl", and "stdcall" fn.It is UNSOUND to link together crates that use different values for this flag!relax_elf_relocationswhether ELF relocations can be relaxedremap paths under the current working directory to this path prefixcomma separated list of scopes: `macro`, `diagnostics`, `debuginfo`, `object`, `all`remap path scope (default: all)remark_dirdirectory into which to write optimization remarks (if not specified, they will be written to standard error output)sanitizercomma separated list of sanitizers: `address`, `cfi`, `dataflow`, `hwaddress`, `kcfi`, `kernel-address`, `leak`, `memory`, `memtag`, `safestack`, `shadow-call-stack`, or `thread`use a sanitizersanitizer_cfi_canonical_jump_tablesenable canonical jump tables (default: yes)sanitizer_cfi_generalize_pointersenable generalizing pointer types (default: no)enable normalizing integer types (default: no)sanitizer_dataflow_abilistadditional ABI list files that control how shadow parameters are passed (comma separated)sanitizer_kcfi_arityenable KCFI arity indicator (default: no)sanitizer_memory_track_origins0, 1, or 2enable origins tracking in MemorySanitizersanitizer_recoverenable recovery for selected sanitizerssaturating_float_castsmake float->int casts UB-free: numbers outside the integer type's range are clipped to the max/min integer respectively, and NaN is mapped to 0 (default: yes)self_profilerun the self profiler and output the raw event dataself_profile_countercounter used by the self profiler (default: `wall-time`), one of: `wall-time` (monotonic clock, i.e. `std::time::Instant`) `instructions:u` (retired instructions, userspace-only) `instructions-minus-irqs:u` (subtracting hardware interrupt counts for extra accuracy)self_profile_eventsspecify the events recorded by the self profiler; for example: `-Z self-profile-events=default,query-keys` all options: none, all, default, generic-activity, query-provider, query-cache-hit query-blocked, incr-cache-load, incr-result-hashing, query-keys, function-args, args, llvm, artifact-sizesshare_genericsmake the current crate share its generic instantiationsshell_argfilesallow argument files to be specified with POSIX "shell-style" argument quotingsimulate_remapped_rust_src_basesimulate the effect of remap-debuginfo = true at bootstrapping by remapping path to rust's source base directory. only meant for testing purposessmall_data_thresholdSet the threshold for objects to be stored in a "small data" sectionspan_debugforward proc_macro::Span's `Debug` impl to `Span`span_free_formatsexclude spans when debug-printing compiler state (default: no)split_dwarf_inliningprovide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARFone of supported split dwarf modes (`split` or `single`)split dwarf variant (only if -Csplit-debuginfo is enabled and on relevant platform) (default: `split`) `split`: sections which do not require relocation are written into a DWARF object (`.dwo`) file which is ignored by the linker `single`: sections which do not require relocation are written into object file but ignored by the linkersplit_lto_unitenable LTO unit splitting (default: no)src_hash_algorithmone of `md5`, `sha1`, or `sha256`hash algorithm of source files in debug info (`md5`, `sha1`, or `sha256`)stack_protectorone of (`none` (default), `basic`, `strong`, or `all`)control stack smash protection strategy (`rustc --print stack-protector-strategies` for details)staticlib_allow_rdylib_depsallow staticlibs to have rust dylib dependenciesstaticlib_prefer_dynamicprefer dynamic linking to static linking for staticlibs (default: no)strict_init_checkscontrol if mem::uninitialized and mem::zeroed panic on more UBteachshow extended diagnostic help (default: no)temps_dirthe directory the intermediate files are written toterminal_urlseither a boolean (`yes`, `no`, `on`, `off`, etc), or `auto`use the OSC 8 hyperlink terminal specification to print hyperlinks in the compiler outputthinltoenable ThinLTO when possiblethreadsmeasure time of each LLVM pass (default: no)time_passesmeasure time of each rustc pass (default: no)time_passes_format`text` (default) or `json`the format to use for -Z time-passes (`text` (default) or `json`)tiny_const_eval_limitsets a tiny, non-configurable limit for const eval; useful for compiler teststls_modelone of supported TLS models (`rustc --print tls-models`)choose the TLS model to use (`rustc --print tls-models` for details)trace_macrosfor every macro invocation, print its name and arguments (default: no)track_diagnosticstracks where in rustc a diagnostic was emittedtranslate_additional_ftladditional fluent translation to preferentially use (for testing translation)emit directionality isolation markers in translated diagnosticstranslate_langa language identifierlanguage identifier for diagnostic outputtranslate_remapped_path_to_local_pathtranslate remapped paths into local paths when possible (default: yes)generate trap instructions for unreachable intrinsics (default: use target setting, usually yes)either no value or a non-negative numbertreat the `val`th error that occurs as bug (default if not specified: 0 - don't treat errors as bugs. default if specified without a value: 1 - treat the first error as bug)trim_diagnostic_pathsin diagnostics, use heuristics to shorten paths referring to itemsselect processor to schedule for (`rustc --print target-cpus` for details)typing_mode_borrowckenable `TypingMode::Borrowck`, changing the way opaque types are handled during MIR borrowckub_checksemit runtime checks for Undefined Behavior (default: -Cdebug-assertions)ui_testingemit compiler diagnostics in a form suitable for UI testing (default: no)uninit_const_chunk_thresholdallow generating const initializers with mixed init/uninit chunks, and set the maximum number of chunks for which this is allowed (default: 16)unleash_the_miri_inside_of_youtake the brakes off const evaluation. NOTE: this is unsound (default: no)`string` or `string=string`present the input source, unstable (and less-pretty) variants; `normal`, `identified`, `expanded`, `expanded,identified`, `expanded,hygiene` (with internal representations), `ast-tree` (raw AST before expansion), `ast-tree,expanded` (raw AST after expansion), `hir` (the HIR), `hir,identified`, `hir,typed` (HIR with types for each node), `hir-tree` (dump the raw HIR), `thir-tree`, `thir-flat`, `mir` (the MIR), or `mir-cfg` (graphviz formatted MIR)enable unsound and buggy MIR optimizations (default: no)adds unstable command line options to rustc interface (default: no)use_ctors_sectionuse legacy .ctors section for initializers rather than .init_arrayuse_sync_unwindGenerate sync unwind tables instead of async unwind tables (default: no)validate_mirvalidate MIR after each transformationverbose_asmadd descriptive comments from LLVM to the assembly (may change behavior) (default: no)verbose_internalsin general, enable more debug printouts (default: no)verify_llvm_irverify LLVM IR (default: no)virtual_function_eliminationenables dead virtual function elimination optimization. Requires `-Clto[=[fat,yes]]`wasi_exec_modeleither `command` or `reactor`whether to build a wasi command or reactorwasm_c_abi`legacy` or `spec`use spec-compliant C ABI for `wasm32-unknown-unknown` (default: legacy)write_long_types_to_diskwhether long type names should be written to files instead of being printed in errors Available codegen options: -Carthis option is deprecated and does nothingcode_modelone of supported code models (`rustc --print code-models`)choose the code model to use (`rustc --print code-models` for details)codegen_unitsdivide crate into N units to optimize in parallelcollapse_macro_debuginfoone of `no`, `external`, or `yes`set option to collapse debuginfo for macroscontrol_flow_guardeither a boolean (`yes`, `no`, `on`, `off`, etc), `checks`, or `nochecks`use Windows Control Flow Guard (default: no)explicitly enable the `cfg(debug_assertions)` directivedebuginfoeither an integer (0, 1, 2), `none`, `line-directives-only`, `line-tables-only`, `limited`, or `full`debug info emission level (0-2, none, line-directives-only, line-tables-only, limited, or full; default: 0)default_linker_librariesallow the linker to link its default libraries (default: no)dlltoolimport library generation tool (ignored except when targeting windows-gnu)embed_bitcodeemit bitcode in rlibs (default: yes)extra_filenameextra data to put in each output filenameforce_frame_pointersone of `true`/`yes`/`on`, `false`/`no`/`off`, or (with -Zunstable-options) `non-leaf` or `always`force use of the frame pointersforce_unwind_tablesforce use of unwind tablesincrementalenable incremental compilationthis option is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)instrument_coverageinstrument the generated code to support LLVM source-based code coverage reports (note, the compiler build config must include `profiler = true`); implies `-C symbol-mangling-version=v0`a single extra argument to append to the linker invocation (can be used several times)link_argsextra arguments to append to the linker invocation (space separated)link_dead_codetry to generate and link dead code (default: no)link_self_containedone of: `y`, `yes`, `on`, `n`, `no`, `off`, or a list of enabled (`+` prefix) and disabled (`-` prefix) components: `crto`, `libc`, `unwind`, `linker`, `sanitizers`, `mingw`control whether to link Rust provided C objects/libraries or rely on a C toolchain or linker installed in the systemlinkersystem linker to link outputs withlinker_flavorone of: gnu gnu-lld gnu-cc gnu-lld-cc darwin darwin-lld darwin-cc darwin-lld-cc wasm-lld wasm-lld-cc unix unix-cc msvc-lld msvc em-cc bpf llbc ptx gcc ld ld.lld ld64.lld lld-link wasm-ld em linker flavorlinker_plugin_ltoeither a boolean (`yes`, `no`, `on`, `off`, etc), or the path to the linker plugingenerate build artifacts that are compatible with linker-based LTOllvm_argsa list of arguments to pass to LLVM (space separated)ltoeither a boolean (`yes`, `no`, `on`, `off`, etc), `thin`, `fat`, or omittedperform LLVM link-time optimizationsmetadata to mangle symbol names withno_prepopulate_passesgive an empty list of passes to the pass managerno_redzonedisable the use of the redzoneno_stack_checkno_vectorize_loopsdisable loop vectorization optimization passesdisable LLVM's SLP vectorization passopt_leveloptimization level (0-3, s, or z; default: 0)overflow_checksuse overflow checks for integer arithmeticpanicpanic strategy to compile crate withpassesa list of extra LLVM passes to run (space separated)prefer_dynamicprefer dynamic linking to static linking (default: no)compile the program with profiling instrumentationprofile_useuse the given `.profdata` file for profile-guided optimizationone of supported relocation models (`rustc --print relocation-models`)control generation of position-independent code (PIC) (`rustc --print relocation-models` for details)relro_levelone of: `full`, `partial`, or `off`choose which RELRO level to useremarka space-separated list of passes, or `all`output remarks for these optimization passes (space separated, or "all")rpathset rpath values in libs/exes (default: no)save_tempssave all temporary output files during compilation (default: no)soft_floatdeprecated option: use soft float ABI (*eabihf targets only) (default: no)split_debuginfoone of supported split-debuginfo modes (`off`, `packed`, or `unpacked`)how to handle split-debuginfo, a platform-specific optionstripeither `none`, `debuginfo`, or `symbols`tell the linker which information to strip (`none` (default), `debuginfo` or `symbols`)symbol_mangling_versionone of: `legacy`, `v0` (RFC 2603), or `hashed`which mangling version to use for symbol names ('legacy' (default), 'v0', or 'hashed')target_cpuselect target processor (`rustc --print target-cpus` for details)target_featuretarget specific attributes. (`rustc --print target-features` for details). This feature is unsafe.unsafe_allow_abi_mismatchAllow incompatible target modifiers in dependency crates (comma separated list)