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,
RustcTargetData::dep_platform_activated
to check if platform is activated.RustcTargetData::info
to get aTargetInfo
for an in-depth query.TargetInfo::rustc_outputs
to get a list of supported file types.
Structs§
- File
Type - Type of each file generated by a Unit.
- Rust
DocFingerprint - Structure used to deal with Rustdoc fingerprinting
- Rustc
Target Data - Collection of information about
rustc
and the host and target. - Target
Info - Information about the platform target gleaned from querying rustc.
Enums§
- File
Flavor - 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 likelibcargo.rlib
, we have prefix “lib” and suffix “rlib”). - rustflags_
from_ 🔒build - Gets compiler flags from
[build]
section in the config. Seeextra_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. Seeextra_args
for more. - rustflags_
from_ 🔒target - Gets compiler flags from
[target]
section in the config. Seeextra_args
for more.