Skip to content

Commit

Permalink
make it actually detect whether xwin and zigbuild are needed
Browse files Browse the repository at this point in the history
  • Loading branch information
duckinator committed Dec 16, 2024
1 parent 8308e0d commit c4b43d1
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions cargo-dist/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -71,26 +71,28 @@ 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()
.chain(dist.global_build_steps.iter())
{
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 => {}
}
*/
}
_ => {}
}
Expand Down

0 comments on commit c4b43d1

Please sign in to comment.