fn probe_target_info(&mut self) -> CargoResult<()> {
let _p = profile::start("Context::probe_target_info");
debug!("probe_target_info");
- let host_target_same = match self.requested_target() {
- Some(s) if s != self.config.rustc()?.host => false,
+ let host_target_same = match self.build_config.requested_target {
+ Some(ref s) if s != &self.config.rustc()?.host => false,
_ => true,
};
/// Return the target triple which this context is targeting.
pub fn target_triple(&self) -> &str {
- self.requested_target()
+ self.build_config
+ .requested_target
+ .as_ref()
+ .map(|s| &s[..])
.unwrap_or_else(|| self.host_triple())
}
- /// Requested (not actual) target for the build
- pub fn requested_target(&self) -> Option<&str> {
- self.build_config.requested_target.as_ref().map(|s| &s[..])
- }
-
/// Return the filenames that the given target for the given profile will
/// generate as a list of 3-tuples (filename, link_dst, linkable)
///
add_path_args(cx, unit, &mut rustdoc);
if unit.kind != Kind::Host {
- if let Some(target) = cx.requested_target() {
+ if let Some(ref target) = cx.build_config.requested_target {
rustdoc.arg("--target").arg(target);
}
}
cmd,
"--target",
"",
- cx.requested_target().map(|s| s.as_ref()),
+ cx.build_config
+ .requested_target
+ .as_ref()
+ .map(|s| s.as_ref()),
);
}