Skip to content

Commit a94bd38

Browse files
committed
tidy: remove filtering for wasm32 deps, as this don't work now
1 parent 2db26d3 commit a94bd38

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5453,7 +5453,6 @@ dependencies = [
54535453
name = "tidy"
54545454
version = "0.1.0"
54555455
dependencies = [
5456-
"cargo-platform",
54575456
"cargo_metadata 0.15.4",
54585457
"ignore",
54595458
"lazy_static",

src/tools/tidy/Cargo.toml

Lines changed: 0 additions & 1 deletion
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

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ const PERMITTED_DEPS_LOCATION: &str = concat!(file!(), ":", line!());
189189
/// rustc. Please check with the compiler team before adding an entry.
190190
const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
191191
// tidy-alphabetical-start
192+
"addr2line",
192193
"adler",
193194
"ahash",
194195
"aho-corasick",
@@ -429,6 +430,7 @@ const PERMITTED_CRANELIFT_DEPENDENCIES: &[&str] = &[
429430
"mach",
430431
"memchr",
431432
"object",
433+
"once_cell",
432434
"regalloc2",
433435
"region",
434436
"rustc-hash",
@@ -614,27 +616,7 @@ fn check_permitted_dependencies(
614616
let mut deps = HashSet::new();
615617
for to_check in restricted_dependency_crates {
616618
let to_check = pkg_from_name(metadata, to_check);
617-
use cargo_platform::Cfg;
618-
use std::str::FromStr;
619-
// We don't expect the compiler to ever run on wasm32, so strip
620-
// out those dependencies to avoid polluting the permitted list.
621-
deps_of_filtered(metadata, &to_check.id, &mut deps, &|dep_kinds| {
622-
dep_kinds.iter().any(|dep_kind| {
623-
dep_kind
624-
.target
625-
.as_ref()
626-
.map(|target| {
627-
!target.matches(
628-
"wasm32-unknown-unknown",
629-
&[
630-
Cfg::from_str("target_arch=\"wasm32\"").unwrap(),
631-
Cfg::from_str("target_os=\"unknown\"").unwrap(),
632-
],
633-
)
634-
})
635-
.unwrap_or(true)
636-
})
637-
});
619+
deps_of_filtered(metadata, &to_check.id, &mut deps, &|_| true);
638620
}
639621

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

0 commit comments

Comments
 (0)