Module target_info

Source
Expand description

This modules contains types storing information of target platforms.

Normally, call RustcTargetData::new to construct all the target platform once, and then query info on your demand. For example,

StructsΒ§

FileType
Type of each file generated by a Unit.
RustDocFingerprint
Structure used to deal with Rustdoc fingerprinting
RustcTargetData
Collection of information about rustc and the host and target.
TargetInfo
Information about the platform target gleaned from querying rustc.

EnumsΒ§

FileFlavor
Kind of each file generated by a Unit, part of FileType.
Flags πŸ”’
Compiler flags for either rustc or rustdoc.

FunctionsΒ§

error_missing_print_output πŸ”’
Helper for creating an error message for missing output from a certain --print request.
extra_args πŸ”’
Acquire extra flags to pass to the compiler from various locations.
output_err_info πŸ”’
Helper for creating an error message when parsing rustc output fails.
parse_crate_type πŸ”’
Takes rustc output (using specialized command line args), and calculates the file prefix and suffix for the given crate type, or returns None if the type is not supported. (e.g., for a Rust library like libcargo.rlib, we have prefix β€œlib” and suffix β€œrlib”).
rustflags_from_build πŸ”’
Gets compiler flags from [build] section in the config. See extra_args for more.
rustflags_from_env πŸ”’
Gets compiler flags from environment variables. See extra_args for more.
rustflags_from_host πŸ”’
Gets compiler flags from [host] section in the config. See extra_args for more.
rustflags_from_target πŸ”’
Gets compiler flags from [target] section in the config. See extra_args for more.