Module rustc_ap_rustc_session::config[][src]

Expand description

Contains infrastructure for configuring the compiler, including parsing command-line options.

Modules

nightly_options

Structs

CodegenOptions
DebuggingOptions
ExternDepSpecs
ExternEntry
Externs

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.

JsonConfig

Possible json config files

Options

The top-level command-line options struct.

OutputFilenames
OutputTypes

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.

RustcOptGroup

Enums

BorrowckMode
CFGuard

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

CrateType
DebugInfo
EntryFnType
ErrorOutputType

The type of diagnostics output to generate.

ExternDepSpec

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.

ExternLocation
Input
InstrumentCoverage

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

LinkerPluginLto
Lto

This is what the LtoCli values get mapped to after resolving defaults and and taking other command line options into account.

LtoCli

The different settings that the -C lto flag can have.

MirSpanview

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.

OptLevel
OptionStability
OutputType
Passes
PpAstTreeMode
PpHirMode
PpMode
PpSourceMode
PrintRequest
Strip

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

SwitchWithOptPath
SymbolManglingVersion
TrimmedDefPaths

Parameter to control path trimming.

WasiExecModel

Constants

CG_OPTIONS
DB_OPTIONS
DWARF_OBJECT_EXT
RLINK_EXT
RUST_CGU_EXT

Functions

build_configuration
build_session_options
default_lib_output
get_cmd_lint_options
host_triple
make_crate_type_option
parse_color

Parses the --color flag.

parse_crate_edition
parse_crate_types_from_list
parse_error_format

Parses the --error-format flag.

parse_externs
parse_json

Parse the --json flag.

parse_target_triple
rustc_optgroups

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.

rustc_short_optgroups

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.

to_crate_config

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.