Module rustc_session::config[][src]

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.

Structs

Use tree-based collections to cheaply get a deterministic Hash implementation. Do not switch BTreeMap or BTreeSet out for an unsorted container type! That would break dependency tracking for command-line arguments.

Possible json config files

The top-level command-line options struct.

Use tree-based collections to cheaply get a deterministic Hash implementation. Do not switch BTreeMap 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.

Enums

The different settings that the -C control-flow-guard flag can have.

The type of diagnostics output to generate.

Supplied source location of a dependency - for example in a build specification file like Cargo.toml. We support several syntaxes: if it makes sense to reference a file and line, then the build system can specify that. On the other hand, it may make more sense to have an arbitrary raw string.

The different settings that the -Z instrument-coverage flag can have.

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.

The different settings that the -Z dump_mir_spanview flag can have. Statement generates a document highlighting each span of every statement (including terminators). Terminator and Block highlight a single span per BasicBlock: the span of the block’s Terminator, or a computed span for the block, representing the entire range, covering the block’s terminator and all of its statements.

The different settings that the -Z strip flag can have.

Parameter to control path trimming.

Constants

Functions

Parses the --color flag.

Parses the --error-format flag.

Parse the --json flag.

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 cfg! configuration from String to Symbol. rustc_interface::interface::Config accepts this in the compiler configuration, but the symbol interner is not yet set up then, so we must convert it later.