diff --git a/cargo-dist/src/lib.rs b/cargo-dist/src/lib.rs index 5481b9ac4..6a83acc48 100644 --- a/cargo-dist/src/lib.rs +++ b/cargo-dist/src/lib.rs @@ -59,7 +59,7 @@ mod tests; /// dist env test -- make sure we have everything we need for a build. pub fn do_env_test(cfg: &Config) -> DistResult<()> { - let (dist, mut manifest) = tasks::gather_work(cfg)?; + let (dist, _manifest) = tasks::gather_work(cfg)?; let builds = dist.config.builds; @@ -71,6 +71,9 @@ pub fn do_env_test(cfg: &Config) -> DistResult<()> { let tools = dist.tools; + let cargo = tools.cargo()?; + let host = cargo.host_target.parse()?; + for step in dist .local_build_steps .iter() @@ -78,19 +81,18 @@ pub fn do_env_test(cfg: &Config) -> DistResult<()> { { match step { BuildStep::Cargo(step) => { - println!("step = {:#?}", step); - /* - let host = step.host; - let target = step.target_triple; - // TODO: Figure out where to get host, target from? - let wrapper = tasks::build_wrapper_for_cross(host, target)?; + let target = step.target_triple.parse()?; + let wrapper = tasks::build_wrapper_for_cross(&host, &target)?; match wrapper { - Some(CargoBuildWrapper::Xwin) => { need_xwin = true; } - Some(CargoBuildWrapper::ZigBuild) => { need_zigbuild = true; } + Some(CargoBuildWrapper::Xwin) => { + need_xwin = true; + } + Some(CargoBuildWrapper::ZigBuild) => { + need_zigbuild = true; + } None => {} } - */ } _ => {} }