pub struct TargetInfo {
pub sysroot: PathBuf,
pub sysroot_host_libdir: PathBuf,
pub sysroot_target_libdir: PathBuf,
pub rustflags: Vec<String>,
pub rustdocflags: Vec<String>,
/* private fields */
}Expand description
Information about the platform target gleaned from querying rustc.
RustcTargetData keeps two of these, one for the host and one for the
target. If no target is specified, it uses a clone from the host.
Fields§
§sysroot: PathBufPath to the sysroot.
sysroot_host_libdir: PathBufPath to the “lib” or “bin” directory that rustc uses for its dynamic libraries.
sysroot_target_libdir: PathBufPath to the “lib” directory in the sysroot which rustc uses for linking target libraries.
rustflags: Vec<String>Extra flags to pass to rustc, see env_args.
rustdocflags: Vec<String>Extra flags to pass to rustdoc, see env_args.
Implementations§
Source§impl TargetInfo
impl TargetInfo
pub fn new( config: &Config, requested_kind: CompileKind, rustc: &Rustc, kind: CompileKind, ) -> CargoResult<TargetInfo>
Sourcepub fn file_types(
&self,
crate_type: &str,
flavor: FileFlavor,
kind: &TargetKind,
target_triple: &str,
) -> CargoResult<Option<Vec<FileType>>>
pub fn file_types( &self, crate_type: &str, flavor: FileFlavor, kind: &TargetKind, target_triple: &str, ) -> CargoResult<Option<Vec<FileType>>>
Returns the list of file types generated by the given crate type.
Returns None if the target does not support the given crate type.
Trait Implementations§
Source§impl Clone for TargetInfo
impl Clone for TargetInfo
Source§fn clone(&self) -> TargetInfo
fn clone(&self) -> TargetInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for TargetInfo
impl !RefUnwindSafe for TargetInfo
impl Send for TargetInfo
impl !Sync for TargetInfo
impl Unpin for TargetInfo
impl UnsafeUnpin for TargetInfo
impl UnwindSafe for TargetInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more