xtask: filter toolchains before .find()
This commit is contained in:
parent
bec9b0f57b
commit
f808a58492
|
@ -156,14 +156,6 @@ fn platform_triples<'a>(
|
|||
architectures
|
||||
.iter()
|
||||
.filter_map(|architecture| get_triple(*platform, *architecture).map(|v| v.triple))
|
||||
.filter(|triple| {
|
||||
if is_toolchain_installed(triple) {
|
||||
true
|
||||
} else {
|
||||
log::warn!("toolchain not installed for {triple} - skipping");
|
||||
false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn platforms_and_triples(
|
||||
|
|
|
@ -42,6 +42,7 @@ pub fn get_triple(
|
|||
) -> Option<cfg_expr::targets::TargetInfo> {
|
||||
cfg_expr::targets::ALL_BUILTINS
|
||||
.iter()
|
||||
.filter(|t| crate::is_toolchain_installed(&t.triple))
|
||||
.find(|b| {
|
||||
b.matches(&cfg_expr::TargetPredicate::Arch(architecture.as_cargo()))
|
||||
&& b.matches(&cfg_expr::TargetPredicate::Os(platform.as_cargo()))
|
||||
|
|
Loading…
Reference in a new issue