Module rustc_session::config
source · Expand description
Contains infrastructure for configuring the compiler, including parsing command-line options.
Modules
- 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/unix/mod.rs!
Structs
- The parsed
--check-cfgoptions - Use tree-based collections to cheaply get a deterministic
Hashimplementation. Do not switchBTreeMaporBTreeSetout for an unsorted container type! That would break dependency tracking for command-line arguments. - Settings for
-Z instrument-xrayflag. - Possible json config files
- The different values
-C link-self-containedcan 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
-C link-self-containedcomponents that can individually be enabled or disabled. - The different settings that can be enabled via the
-Z location-detailflag. - The top-level command-line options struct.
- Use tree-based collections to cheaply get a deterministic
Hashimplementation. Do not switchBTreeMapout 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.
Enums
- The different settings that the
-C control-flow-guardflag can have. - The different settings that the
-Z cf-protectionflag can have. - Which format to use for
-Z dump-mono-stats - The type of diagnostics output to generate.
- Used with
-Z assert-incr-state. - The different settings that the
-C instrument-coverageflag can have. - Report unused externs in event stream
- This is what the
LtoClivalues get mapped to after resolving defaults and and taking other command line options into account. - The different settings that the
-C ltoflag can have. - The different settings that the
-Z dump_mir_spanviewflag can have.Statementgenerates a document highlighting each span of every statement (including terminators).TerminatorandBlockhighlight a single span perBasicBlock: the span of the block’sTerminator, or a computed span for the block, representing the entire range, covering the block’s terminator and all of its statements. - Default behavior to use in out-of-memory situations.
- 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 eitherPackedorUnpackedmodes), and the platform uses DWARF for debug-information. - The different settings that the
-C stripflag can have. - Parameter to control path trimming.
Constants
Statics
Functions
- Parses the
--colorflag. - Parses the
--error-formatflag. - Parse the
--jsonflag. - 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.
- Converts the crate
--check-cfgoptions fromStringtoSymbol.rustc_interface::interface::Configaccepts this in the compiler configuration, but the symbol interner is not yet set up then, so we must convert it later. - Converts the crate
cfg!configuration fromStringtoSymbol.rustc_interface::interface::Configaccepts this in the compiler configuration, but the symbol interner is not yet set up then, so we must convert it later.