File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -306,8 +306,27 @@ pub fn check_dependencies(
306306
307307 // check all dependencies
308308 for dep in & mod_info. dependencies {
309+ let mut platforms = dep. platforms . clone ( ) ;
310+
311+ // Fix platform aliases
312+ if platforms. contains ( & PlatformName :: Android ) {
313+ platforms. insert ( PlatformName :: Android64 ) ;
314+ platforms. insert ( PlatformName :: Android32 ) ;
315+ }
316+
317+ if platforms. contains ( & PlatformName :: MacOS ) {
318+ platforms. insert ( PlatformName :: MacArm ) ;
319+ platforms. insert ( PlatformName :: MacIntel ) ;
320+ }
321+ if platform == PlatformName :: MacOS
322+ && ( platforms. contains ( & PlatformName :: MacArm )
323+ || platforms. contains ( & PlatformName :: MacIntel ) )
324+ {
325+ platforms. insert ( PlatformName :: MacOS ) ;
326+ }
327+
309328 // Skip dependencies not on this platform
310- if !dep . platforms . contains ( & platform) {
329+ if !platforms. contains ( & platform) {
311330 continue ;
312331 }
313332
Original file line number Diff line number Diff line change @@ -222,6 +222,7 @@ pub enum PlatformName {
222222 #[ serde( rename = "win" ) ]
223223 #[ value( alias = "win" ) ]
224224 Windows ,
225+ #[ serde( rename = "mac" ) ]
225226 #[ value( alias = "mac" ) ]
226227 MacOS ,
227228 #[ serde( rename = "mac-intel" ) ]
You can’t perform that action at this time.
0 commit comments