Compare commits

...

2 commits

Author SHA1 Message Date
Alex Janka f808a58492 xtask: filter toolchains before .find() 2024-08-19 11:49:43 +10:00
Alex Janka bec9b0f57b update baseview 2024-08-19 11:41:15 +10:00
3 changed files with 6 additions and 13 deletions

10
Cargo.lock generated
View file

@ -376,7 +376,7 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]] [[package]]
name = "baseview" name = "baseview"
version = "0.1.0" version = "0.1.0"
source = "git+https://git.alexjanka.com/alex/baseview#4e6e9737f1f6eb654ea5bfb566f02e3314192b6a" source = "git+https://git.alexjanka.com/alex/baseview#e31a11f1c73c0fdf1463db77105cf9a9b7c9240a"
dependencies = [ dependencies = [
"cocoa 0.24.1", "cocoa 0.24.1",
"core-foundation 0.9.4", "core-foundation 0.9.4",
@ -1317,7 +1317,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdbd1f579714e3c809ebd822c81ef148b1ceaeb3d535352afc73fd0c4c6a0017" checksum = "bdbd1f579714e3c809ebd822c81ef148b1ceaeb3d535352afc73fd0c4c6a0017"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"libloading 0.8.4", "libloading 0.7.4",
"winapi", "winapi",
] ]
@ -1432,7 +1432,7 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
dependencies = [ dependencies = [
"libloading 0.8.4", "libloading 0.7.4",
] ]
[[package]] [[package]]
@ -2335,7 +2335,7 @@ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"com", "com",
"libc", "libc",
"libloading 0.8.4", "libloading 0.7.4",
"thiserror", "thiserror",
"widestring", "widestring",
"winapi", "winapi",
@ -5337,7 +5337,7 @@ dependencies = [
"js-sys", "js-sys",
"khronos-egl", "khronos-egl",
"libc", "libc",
"libloading 0.8.4", "libloading 0.7.4",
"log", "log",
"metal 0.29.0", "metal 0.29.0",
"naga", "naga",

View file

@ -156,14 +156,6 @@ fn platform_triples<'a>(
architectures architectures
.iter() .iter()
.filter_map(|architecture| get_triple(*platform, *architecture).map(|v| v.triple)) .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( fn platforms_and_triples(

View file

@ -42,6 +42,7 @@ pub fn get_triple(
) -> Option<cfg_expr::targets::TargetInfo> { ) -> Option<cfg_expr::targets::TargetInfo> {
cfg_expr::targets::ALL_BUILTINS cfg_expr::targets::ALL_BUILTINS
.iter() .iter()
.filter(|t| crate::is_toolchain_installed(&t.triple))
.find(|b| { .find(|b| {
b.matches(&cfg_expr::TargetPredicate::Arch(architecture.as_cargo())) b.matches(&cfg_expr::TargetPredicate::Arch(architecture.as_cargo()))
&& b.matches(&cfg_expr::TargetPredicate::Os(platform.as_cargo())) && b.matches(&cfg_expr::TargetPredicate::Os(platform.as_cargo()))