Module cargo::core::compiler::build_context::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,
RustcTargetData::dep_platform_activatedto check if platform is activated.RustcTargetData::infoto get aTargetInfofor an in-depth query.TargetInfo::rustc_outputsto get a list of supported file types.
StructsΒ§
- Type of each file generated by a Unit.
- Structure used to deal with Rustdoc fingerprinting
- Collection of information about
rustcand the host and target. - Information about the platform target gleaned from querying rustc.
EnumsΒ§
- Kind of each file generated by a Unit, part of
FileType. - Flags πCompiler flags for either rustc or rustdoc.
FunctionsΒ§
- Helper for creating an error message for missing output from a certain
--printrequest. - 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
Noneif 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_argsfor more. - rustflags_from_env πGets compiler flags from environment variables. See
extra_argsfor more. - rustflags_from_host πGets compiler flags from
[host]section in the config. Seeextra_argsfor more. - Gets compiler flags from
[target]section in the config. Seeextra_argsfor more.