Skip to content

Commit 3bbe66e

Browse files
committed
tidy: remove filtering for wasm32 deps, as this don't work now
1 parent da1d099 commit 3bbe66e

File tree

3 files changed

+2
-23
lines changed

3 files changed

+2
-23
lines changed

Cargo.lock

-1
Original file line numberDiff line numberDiff line change
@@ -5135,7 +5135,6 @@ dependencies = [
51355135
name = "tidy"
51365136
version = "0.1.0"
51375137
dependencies = [
5138-
"cargo-platform",
51395138
"cargo_metadata",
51405139
"ignore",
51415140
"lazy_static",

src/tools/tidy/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ autobins = false
66

77
[dependencies]
88
cargo_metadata = "0.15"
9-
cargo-platform = "0.1.2"
109
regex = "1"
1110
miropt-test-tools = { path = "../miropt-test-tools" }
1211
lazy_static = "1"

src/tools/tidy/src/deps.rs

+2-21
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ const PERMITTED_CRANELIFT_DEPENDENCIES: &[&str] = &[
338338
"mach",
339339
"memchr",
340340
"object",
341+
"once_cell",
341342
"regalloc2",
342343
"region",
343344
"rustc-hash",
@@ -505,27 +506,7 @@ fn check_permitted_dependencies(
505506
let mut deps = HashSet::new();
506507
for to_check in restricted_dependency_crates {
507508
let to_check = pkg_from_name(metadata, to_check);
508-
use cargo_platform::Cfg;
509-
use std::str::FromStr;
510-
// We don't expect the compiler to ever run on wasm32, so strip
511-
// out those dependencies to avoid polluting the permitted list.
512-
deps_of_filtered(metadata, &to_check.id, &mut deps, &|dep_kinds| {
513-
dep_kinds.iter().any(|dep_kind| {
514-
dep_kind
515-
.target
516-
.as_ref()
517-
.map(|target| {
518-
!target.matches(
519-
"wasm32-unknown-unknown",
520-
&[
521-
Cfg::from_str("target_arch=\"wasm32\"").unwrap(),
522-
Cfg::from_str("target_os=\"unknown\"").unwrap(),
523-
],
524-
)
525-
})
526-
.unwrap_or(true)
527-
})
528-
});
509+
deps_of_filtered(metadata, &to_check.id, &mut deps, &|_| true);
529510
}
530511

531512
// Check that the PERMITTED_DEPENDENCIES does not have unused entries.

0 commit comments

Comments
 (0)