Expand description
Contains infrastructure for configuring the compiler, including parsing command-line options.
Modules§
- cfg πcfg and check-cfg configuration
- dep_
tracking πCommand-line arguments passed to the compiler have to be incorporated with the dependency tracking system for incremental compilation. This module provides some utilities to make this more convenient. - opt π
- NOTE: Keep these constants in sync with
library/std/src/sys/pal/unix/mod.rs
!
Structs§
- The parsed
--check-cfg
options. - Individual flag values controlled by
-Z coverage-options
. - Use tree-based collections to cheaply get a deterministic
Hash
implementation. Do not switchBTreeMap
orBTreeSet
out for an unsorted container type! That would break dependency tracking for command-line arguments. - Settings for
-Z instrument-xray
flag. - Possible json config files
- The different values
-C link-self-contained
can take: a list of individually enabled or disabled components used during linking, coming from the rustc distribution, instead of being found somewhere on the host system. - The different values that
-Z linker-features
can take on the CLI: a list of individually enabled or disabled features used during linking. - The different settings that can be enabled via the
-Z location-detail
flag. - The top-level command-line options struct.
- Use tree-based collections to cheaply get a deterministic
Hash
implementation. Do not switchBTreeMap
out for an unsorted container type! That would break dependency tracking for command-line arguments. Also only hash keys, since tracking should only depend on the output types, not the paths theyβre written to. -Z patchable-function-entry
representation - how many nops to put before and after function entry.- Scopes used to determined if it need to apply to βremap-path-prefix
Enums§
- The different settings that the
-C control-flow-guard
flag can have. - The different settings that the
-Z cf-protection
flag can have. - How to perform collapse macros debug info if-ext - if macro from different crate (related to callsite code) | cmd \ attr | no | (unspecified) | external | yes | | no | no | no | no | no | | (unspecified) | no | no | if-ext | yes | | external | no | if-ext | if-ext | yes | | yes | yes | yes | yes | yes |
- Controls whether branch coverage or MC/DC coverage is enabled.
- Which format to use for
-Z dump-mono-stats
- The type of diagnostics output to generate.
- Values for the
-Z fmt-debug
flag. - The different settings that the
-Zfunction-return
flag can have. - Used with
-Z assert-incr-state
. - The different settings that the
-C instrument-coverage
flag can have. - Report unused externs in event stream
- This is what the
LtoCli
values get mapped to after resolving defaults and and taking other command line options into account. - The different settings that the
-C lto
flag can have. - Whether extra span comments are included when dumping MIR, via the
-Z mir-include-spans
flag. By default, only enabled in the NLL MIR dumps, and disabled in all other passes. - Default behavior to use in out-of-memory situations.
- Option
Stability π -Zpolonius
values, enabling the borrow checker polonius analysis, and which version: legacy, or future prototype.- Pretty print mode
- How to run proc-macro code when building this crate
- Split debug-information is enabled by
-C split-debuginfo
, this enum is only used if split debug-information is enabled (in eitherPacked
orUnpacked
modes), and the platform uses DWARF for debug-information. - The different settings that the
-C strip
flag can have.
Constants§
Statics§
- EDITION_
STRING π
Functions§
- default_
lib_ πoutput - file_
path_ πmapping - Parses the
--color
flag. - Parses the
--error-format
flag. - Parse the
--json
flag. - parse_
libs π - parse_
logical_ πenv - parse_
opt_ πlevel - parse_
output_ πtypes - parse_
pretty π - Returns all rustc command line options, including metadata for each option, such as whether the option is part of the stable long-term interface for rustc.
- Returns the βshortβ subset of the rustc command line options, including metadata for each option, such as whether the option is part of the stable long-term interface for rustc.
- select_
debuginfo π - split_
out_ πfile_ name
Type Aliases§
- The parsed
--cfg
options that define the compilation environment of the crate, used to drive conditional compilation.