@@ -189,6 +189,7 @@ const PERMITTED_DEPS_LOCATION: &str = concat!(file!(), ":", line!());
189189/// rustc. Please check with the compiler team before adding an entry.
190190const 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