[−][src]Struct cargo::core::compiler::BuildContext
The build context, containing all information about a build task
Fields
ws: &'a Workspace<'cfg>
The workspace the build is for
config: &'cfg Config
The cargo configuration
resolve: &'a Resolve
The dependency graph for our build
profiles: &'a Profiles
build_config: &'a BuildConfig
extra_compiler_args: HashMap<Unit<'a>, Vec<String>>
Extra compiler args for either rustc
or rustdoc
.
packages: &'a PackageSet<'cfg>
rustc: Rustc
Information about the compiler
host_config: TargetConfig
Build information for the host arch
target_config: TargetConfig
Build information for the target
target_info: TargetInfo
host_info: TargetInfo
incremental_env: Option<bool>
Methods
impl<'a, 'cfg> BuildContext<'a, 'cfg>
[src]
pub fn new(
ws: &'a Workspace<'cfg>,
resolve: &'a Resolve,
packages: &'a PackageSet<'cfg>,
config: &'cfg Config,
build_config: &'a BuildConfig,
profiles: &'a Profiles,
extra_compiler_args: HashMap<Unit<'a>, Vec<String>>
) -> CargoResult<BuildContext<'a, 'cfg>>
[src]
ws: &'a Workspace<'cfg>,
resolve: &'a Resolve,
packages: &'a PackageSet<'cfg>,
config: &'cfg Config,
build_config: &'a BuildConfig,
profiles: &'a Profiles,
extra_compiler_args: HashMap<Unit<'a>, Vec<String>>
) -> CargoResult<BuildContext<'a, 'cfg>>
pub fn extern_crate_name(
&self,
unit: &Unit<'a>,
dep: &Unit<'a>
) -> CargoResult<String>
[src]
&self,
unit: &Unit<'a>,
dep: &Unit<'a>
) -> CargoResult<String>
pub fn dep_platform_activated(&self, dep: &Dependency, kind: Kind) -> bool
[src]
Whether a dependency should be compiled for the host or target platform,
specified by Kind
.
pub fn linker(&self, kind: Kind) -> Option<&Path>
[src]
Get the user-specified linker for a particular host or target
pub fn ar(&self, kind: Kind) -> Option<&Path>
[src]
Get the user-specified ar
program for a particular host or target
pub fn cfg(&self, kind: Kind) -> &[Cfg]
[src]
Get the list of cfg printed out from the compiler for the specified kind
pub fn host_triple(&self) -> &str
[src]
The host arch triple
e.g. x86_64-unknown-linux-gnu, would be
- machine: x86_64
- hardware-platform: unknown
- operating system: linux-gnu
pub fn target_triple(&self) -> &str
[src]
pub fn jobs(&self) -> u32
[src]
Number of jobs specified for this build
pub fn rustflags_args(&self, unit: &Unit) -> CargoResult<Vec<String>>
[src]
pub fn rustdocflags_args(&self, unit: &Unit) -> CargoResult<Vec<String>>
[src]
pub fn show_warnings(&self, pkg: PackageId) -> bool
[src]
pub fn extra_args_for(&self, unit: &Unit<'a>) -> Option<&Vec<String>>
[src]
Auto Trait Implementations
impl<'a, 'cfg> !Send for BuildContext<'a, 'cfg>
impl<'a, 'cfg> !Sync for BuildContext<'a, 'cfg>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self